windows主機資源Snmp OIDs CPU, Memory, Disk等

來源:互聯網
上載者:User
Windows OID' for CPU, Memory, Disk Utilization2007-10-31 11:03Windows CPU Utilization: 

OID:.1.3.6.1.2.1.25.3.3.1.2 (.iso.org.dod.internet.mgmt.mib-2.host.hrDevice.hrProcessorTable.hrProcessorEntry.hrProcessorLoad) in HOST-RESOURCES-MIB 

1.3.6.1.2.1.25.3.3.1.2.2 And 1.3.6.1.2.1.25.3.3.1.2.3 

Windows Memory Utilization: 

Total : OID: 1.3.6.1.2.1.25.2.2.0 單位(KB)--Windows 2003 

1.3.6.1.2.1.25.2.2.0 = 2096304 [Integer] 

Memory Usage 的處理和 HDD total, HDD usage一致 

Windows Disk Utilization: 

Total OID: 

Usage OID: 

1. Disk type OID (hrStrogeType): 

hrStorageTypes 
1.3.6.1.2.1.25.2.1 
OBJECT IDENTIFIER 

hrStorageOther 
1.3.6.1.2.1.25.2.1.1 
OBJECT IDENTIFIER 

hrStorageRam 
1.3.6.1.2.1.25.2.1.2 
OBJECT IDENTIFIER 

hrStorageVirtualMemory 
1.3.6.1.2.1.25.2.1.3 
OBJECT IDENTIFIER 

hrStorageFixedDisk 
1.3.6.1.2.1.25.2.1.4 
OBJECT IDENTIFIER 

hrStorageRemovableDisk 
1.3.6.1.2.1.25.2.1.5 
OBJECT IDENTIFIER 

hrStorageFloppyDisk 
1.3.6.1.2.1.25.2.1.6 
OBJECT IDENTIFIER 

hrStorageCompactDisc 
1.3.6.1.2.1.25.2.1.7 
OBJECT IDENTIFIER 

hrStorageRamDisk 
1.3.6.1.2.1.25.2.1.8 
OBJECT IDENTIFIER 

hrStorageRam 表示記憶體, hrStorageFixedDisk 表示硬碟, hrStorageVirtualMemory 表示虛擬記憶體, hrStorageCompactDisc 表示光碟片 

2. 區分各個磁碟/分區的類型 

1.3.6.1.2.1.25.2.3.1.2.1 = 1.3.6.1.2.1.25.2.1.4 [ObjectIdentifier] //硬碟 
1.3.6.1.2.1.25.2.3.1.2.2 = 1.3.6.1.2.1.25.2.1.4 [ObjectIdentifier] //硬碟 
1.3.6.1.2.1.25.2.3.1.2.3 = 1.3.6.1.2.1.25.2.1.4 [ObjectIdentifier] //硬碟 
1.3.6.1.2.1.25.2.3.1.2.4 = 1.3.6.1.2.1.25.2.1.4 [ObjectIdentifier] //硬碟 
1.3.6.1.2.1.25.2.3.1.2.5 = 1.3.6.1.2.1.25.2.1.7 [ObjectIdentifier] //光碟片 
1.3.6.1.2.1.25.2.3.1.2.6 = 1.3.6.1.2.1.25.2.1.7 [ObjectIdentifier] //光碟片 
1.3.6.1.2.1.25.2.3.1.2.7 = 1.3.6.1.2.1.25.2.1.3 [ObjectIdentifier] //虛擬記憶體 
1.3.6.1.2.1.25.2.3.1.2.8 = 1.3.6.1.2.1.25.2.1.2 [ObjectIdentifier] //實體記憶體 

3. Disk/分區 Information OID: 

1.3.6.1.2.1.25.2.3.1.3.1 = "C:\ Label: Serial Number dc26ea33" [Octets] 
1.3.6.1.2.1.25.2.3.1.3.2 = "D:\ Label:test Serial Number 9629f314" [Octets] 
1.3.6.1.2.1.25.2.3.1.3.3 = "E:\ Label:test_backup Serial Number 94389268" [Octets] 
1.3.6.1.2.1.25.2.3.1.3.4 = "F:\ Label:others Serial Number 5c4002e8" [Octets] 
1.3.6.1.2.1.25.2.3.1.3.5 = "G:\" [Octets] 
1.3.6.1.2.1.25.2.3.1.3.6 = "H:\ Label:Oracle10g Serial Number b1c04dbe" [Octets] 
1.3.6.1.2.1.25.2.3.1.3.7 = "Virtual Memory" [Octets] 
1.3.6.1.2.1.25.2.3.1.3.8 = "Physical Memory" [Octets] 

4. StorageAllocationUnits OID:也叫每個箸/塊的大小 

1.3.6.1.2.1.25.2.3.1.4.1 = 512 [Integer] 
1.3.6.1.2.1.25.2.3.1.4.2 = 4096 [Integer] 
1.3.6.1.2.1.25.2.3.1.4.3 = 4096 [Integer] 
1.3.6.1.2.1.25.2.3.1.4.4 = 4096 [Integer] 
1.3.6.1.2.1.25.2.3.1.4.5 = 0 [Integer] 
1.3.6.1.2.1.25.2.3.1.4.6 = 2048 [Integer] 
1.3.6.1.2.1.25.2.3.1.4.7 = 65536 [Integer] 
1.3.6.1.2.1.25.2.3.1.4.8 = 65536 [Integer] 

5.StorageSize OID:一個磁碟分為多少塊/箸, 總大小 

1.3.6.1.2.1.25.2.3.1.5.1 = 25157789 [Integer] 
1.3.6.1.2.1.25.2.3.1.5.2 = 2815383 [Integer] 
1.3.6.1.2.1.25.2.3.1.5.3 = 4096567 [Integer] 
1.3.6.1.2.1.25.2.3.1.5.4 = 11006525 [Integer] 
1.3.6.1.2.1.25.2.3.1.5.5 = 0 [Integer] 
1.3.6.1.2.1.25.2.3.1.5.6 = 317298 [Integer] 
1.3.6.1.2.1.25.2.3.1.5.7 = 63101 [Integer] 
1.3.6.1.2.1.25.2.3.1.5.8 = 32754 [Integer] 

6. StorageUsed OID://已經使用的塊/箸 

1.3.6.1.2.1.25.2.3.1.6.1 = 7427924 [Integer] 
1.3.6.1.2.1.25.2.3.1.6.2 = 861039 [Integer] 
1.3.6.1.2.1.25.2.3.1.6.3 = 16820 [Integer] 
1.3.6.1.2.1.25.2.3.1.6.4 = 5788717 [Integer] 
1.3.6.1.2.1.25.2.3.1.6.5 = 0 [Integer] 
1.3.6.1.2.1.25.2.3.1.6.6 = 317298 [Integer] 
1.3.6.1.2.1.25.2.3.1.6.7 = 12172 [Integer] 
1.3.6.1.2.1.25.2.3.1.6.8 = 13270 [Integer] 

7. StorageAllocationFailures OID://分配失敗的塊/箸 

1.3.6.1.2.1.25.2.3.1.7.1 = 0 [Counter32] 
1.3.6.1.2.1.25.2.3.1.7.2 = 0 [Counter32] 
1.3.6.1.2.1.25.2.3.1.7.3 = 0 [Counter32] 
1.3.6.1.2.1.25.2.3.1.7.4 = 0 [Counter32] 
1.3.6.1.2.1.25.2.3.1.7.5 = 0 [Counter32] 
1.3.6.1.2.1.25.2.3.1.7.6 = 0 [Counter32] 
1.3.6.1.2.1.25.2.3.1.7.7 = 0 [Counter32] 
1.3.6.1.2.1.25.2.3.1.7.8 = 0 [Counter32] 

8. 在這個例子中 
可以看到的盤符是C: D: E: F:; 同時可以得到虛擬記憶體資訊,實體記憶體的資訊 

C: 盤大小為512× 25157789= 12880787968bytes or 12GB 

C: 盤以用空間512×7427924= 3803097088bytes or 3.54GB 

C:盤使用率為3.54/12*100% = 29.5% 

C: 盤空間分配錯誤512×0 = 0 bytes 

硬碟總的大小為512*25157789 + 4096*2815383 + 4096*4096567+ 4096*11006525 = about 80G 

磁碟使用大小為512*7427924 + 4096*861039 + 4096*16820 + 4096*5788717 = about 29G 

整個硬碟的使用率 29/80 *100% = 36.2% 

實體記憶體 

Total RAM 65536*32754 = 2096256 KB, 2047.125M about 2G 這個數字和1.3.6.1.2.1.25.2.2.0結果差不多 

Used RAM 65536*13270 = 829M 

記憶體使用量率 829/2048 * 100% = 40.4%

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.