Host Resources MIB RFC 2790 YenCheng Chen IM
Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU
MIBs Supported in Windows XP n n n MIB-II (RFC 1213) Host Resource MIB (RFC 2790) LAN Manager MIB-II (. 1. 3. 6. 1. 4. 1. 77) Microsoft DHCP server MIB (. 1. 3. 6. 1. 4. 1. 311. 1. 3) Microsoft Internet Information Server MIB (. 1. 3. 6. 1. 4. 1. 311. 1. 7) Microsoft WINS server MIB Using SNMP for Network Management (. 1. 3. 6. 1. 4. 1. 311. 1. 2) MIB Object Types for Windows NT
References n RFCs q n RFC 2790: Host Resources MIB Modules: q HOST-RESOURCES-MIB ( HR-MIB ) q HOST-RESOURCES-TYPES ( HR-TYPES ) Lab. Files (php) • http: //ycchen. im. ncnu. edu. tw/nm/hr-php. zip Lab. Files (Java projects): • snmpwalk. java, get. Table. java • http: //www. im. ncnu. edu. tw/ycchen/nm/get. Table. zip
Management of Host Computers n Host Resources MIB defines a uniform set of objects useful for the management of host computers. n Objects which also provide host management functionality. q system group in SNMPv 2 -MIB [RFC 1907] q interfaces group IF-MIB [RFC 2233]
Groups of Host Resources MIB n host OBJECT IDENTIFIER : : = { mib-2 25 } q 1. 3. 6. 1. 25 6 Groups: n hr. System OBJECT IDENTIFIER : : = { host 1 } hr. Storage OBJECT IDENTIFIER : : = { host 2 } hr. Device OBJECT IDENTIFIER : : = { host 3 } hr. SWRun OBJECT IDENTIFIER : : = { host 4 } hr. SWRun. Perf OBJECT IDENTIFIER : : = { host 5 } hr. SWInstalled OBJECT IDENTIFIER : : = { host 6 } n hr. MIBAdmin. Info OBJECT IDENTIFIER : : = { host 7 } n n n
1. hr. System: HR System Group n n n hr. System. Uptime { hr. System 1 } hr. System. Date { hr. System 2} hr. System. Initial. Load. Device { hr. System 3} hr. System. Initial. Load. Parameters { hr. System 4} hr. System. Num. Users { hr. System 5} Index of the hr. Device. Entry hr. System. Processes { hr. System 6}
hr. System Example java snmpwalk –c community –m HR-MIB 10. 13. 7 hr. System host. hr. System. Uptime. 0: 14 days, 17 hours, 10 minutes, 28 seconds. host. hr. System. Date. 0: 2006 -42, 9: 55: 14. 0 host. hr. System. Initial. Load. Device. 0: 0 host. hr. System. Initial. Load. Parameters. 0: host. hr. System. Num. Users. 0: 2 host. hr. System. Processes. 0: 66
2. hr. Storage: HR Storage Group n (Oid) hr. Storage. Types hr. Storage 1 } { (Size of RAM in Kbytes) hr. Memory. Size n hr. Storage. Table q hr. Storage. Entry n hr. Storage. Table 1 } { hr. Storage 2 } { hr. Storage 3 } { n hr. Storage. Index n hr. Storage. Type hr. Storage. Descr { hr. Storage. Entry 2 } hr. Storage. Allocation. Units hr. Storage. Size { hr. Storage. Entry 4 } n n n hr. Storage. Entry 1 } hr. Storage. Entry 3 } { { { hr. Storage. Entry 5 }
hr. Storage Example n host. hr. Storage. hr. Memory. Size. 0: 1031472(KBytes) ≒ 0. 98 GBytes (bytes) java get. Table 127. 0. 0. 1 community hr. Storage. Table “HR-MIB HR-TYPES” > hr. Storage. Table. html
Php Example: realtable. php <? php snmp_set_quick_print(true); snmp_read_mib("hr. Types. txt"); $host = "127. 0. 0. 1"; $community = "public"; $oid = "HOST-RESOURCES-MIB: : hr. Storage. Table"; $arr = realtable($host, $community, $oid, 7); … ? > C: usrmibsHOST-RESOURCES-TYPES. txt
Example hr. Storage. Descr: C: . . . hr. Storage. Allocation. Unit s: 4096 hr. Storage. Size: 11442296 hr. Storage. Used: 4739161 Disk Capacity: (bytes) 11442296 * 4096 = 46867644416 Available Disk Space: (%) (11442296 -4739161)/11442296 *100% = 58. 6 %
3. hr. Device: HR Device Group n n n (Oid) hr. Device. Types } hr. Device. Table } hr. Processor. Table hr. Network. Table } hr. Printer. Table hr. Disk. Storage. Table } { hr. Device 1 { hr. Device 2 { hr. Device 3 } { hr. Device 4 { hr. Device 5 } { hr. Device 6
hr. Device. Table - The table of devices contained by the host n hr. Device. Table q hr. Device. Entry hr. Device. Table 1 } n hr. Device. Index n hr. Device. Type n hr. Device. Descr n hr. Device. ID n hr. Device. Status n hr. Device. Errors { hr. Device 2 } { { hr. Device. Entry 1 } { hr. Device. Entry 2 } { hr. Device. Entry 3 } { hr. Device. Entry 4 } { hr. Device. Entry 5 } { hr. Device. Entry 6 }
hr. Device. Table Example
hr. Processor. Table n - The table of processors hr. Processor. Table { hr. Device 3 } q hr. Processor. Entry { hr. Processor. Table 1 } n hr. Processor. Frw. ID { hr. Processor. Entry 1 } - Product ID of Firmware n hr. Processor. Load { hr. Processor. Entry 2 } - The average, over the last minute, of the percentage of time that this processor was not idle. hr. Device. Index
hr. Network. Table - The table of network devices n hr. Network. Table q hr. Network. Entry n hr. Network. If. Index hr. Network. Entry 1 } hr. Device. Index if. Table: { hr. Device 4 } { hr. Network. Table 1 } {
hr. Printer. Table n hr. Printer. Table 5} q { hr. Device hr. Printer. Entry { hr. Printer. Table 1} other(1), unknown(2), idle(3), printing(4), warmup(5) n hr. Printer. Status { hr. Printer. Entry 1 } Bits: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0: low. Paper 5: jammed n hr. Printer. Detected. Error. State 1: no. Paper 6: offline 2: } low. Toner 7: service. Requested 3: no. Toner 8: input. Tray. Missing 4: door. Open 9: output. Tray. Missing 10: marker. Supply. Missing { hr. Printer. Entry 2 11: output. Near. Full 12: output. Full 13: input. Tray. Empty 14: overdue. Prevent. Maint
hr. Disk. Storage. Table - The table of long-term storage devices n hr. Disk. Storage. Table q { hr. Device 6 } hr. Disk. Storage. Entry { hr. Disk. Storage. Table 1} n hr. Disk. Storage. Access { hr. Disk. Storage. Entry 1 } n hr. Disk. Storage. Media { hr. Disk. Storage. Entry 2 } n hr. Disk. Storage. Removeble { hr. Disk. Storage. Entry 3 } n hr. Disk. Storage. Capacity { hr. Disk. Storage. Entry
hr. Disk. Storage. Table Example KBytes hr. Device. Index
hr. Partition. Table - The table of partitions for long-term storage devices n hr. Partition. Table q hr. Partition. Entry n hr. Partition. Index n hr. Partition. Label n hr. Partition. ID n hr. Partition. Size n hr. Partition. FSIndex { hr. Device 7 } { hr. Partition. Table 1 } { hr. Partition. Entry 2 } { hr. Partition. Entry 3 } { hr. Partition. Entry 4 } { hr. Partition. Entry 5 } FS: File System
hr. Partition. Table Example KBytes hr. Device. Index hr. Partition. Index 1 2 3 4 5
hr. FSTable - The table of file systems local or remotely mounted n n hr. FSTable 8} hr. FSEntry hr. FSTable 1 } q hr. FSIndex q hr. FSMount. Point q hr. FSRemote. Mount. Point q hr. FSType q hr. FSAccess q hr. FSBootable q hr. FSStorage. Index q hr. FSLast. Full. Backup. Date q hr. FSLast. Partial. Backup. Date { hr. Device { { hr. FSEntry 1 } { hr. FSEntry 2} { hr. FSEntry 3 } { hr. FSEntry 4 } { hr. FSEntry 5 } { hr. FSEntry 6 } { hr. FSEntry 7 } { hr. FSEntry 8 } { hr. FSEntry
hr. FSTable Example January 1, year 0000, 00: 00. 0
4. hr. SWRun: HR Running Software Group n hr. SWOSIndex { hr. SWRun n 1} hr. SWRun. Table 2} { hr. SWRun. Entry { hr. SWRun. Table 1} n hr. SWRun. Index { hr. SWRun. Entry 1 } n hr. SWRun. Name { hr. SWRun. Entry 2 } n hr. SWRun. ID { hr. SWRun. Entry 3 } n hr. SWRun. Path { hr. SWRun. Entry 4 } n hr. SWRun. Parameters { hr. SWRun. Entry 5 } unknown(1), running(1), n hr. SWRun. Type { hr. SWRun. Entry 6} operating. System(2 runnable(2), hr. SWRun. Type: hr. SWRun. Status: ), not. Runnable(3), 7 } n hr. SWRun. Status { hr. SWRun. Entry q device. Driver(3), invalid(4)
hr. SWRun. Table Example - The table of software running on the host hr. SWRun. hr. SWOSIndex. 0: 4
5. hr. SWRun. Perf: HR Running Software Performance Group n hr. SWRun. Perf. Table { hr. SWRun. Perf 1 } - The table of running software performance metrics q hr. SWRun. Perf. Entry hr. SWRun. Perf. Table 1 } n hr. SWRun. Perf. CPU { { hr. SWRun. Perf. Entry 1 } - Number of centi-seconds of the CPU resources consumed by this process. n hr. SWRun. Perf. Mem { hr. SWRun. Perf. Entry 2 } - The total amount of real system memory allocated to this process. (in Kbytes)
hr. SWRun. Perf. Table Example hr. SWRun. Table hr. SWRun. Perf. Table = = =
6. hr. SWInstalled: HR Installed Software Group n n n hr. SWInstalled. Last. Change { hr. SWInstalled 1 } { hr. SWInstalled 2 } { hr. SWInstalled. Last. Update. Tim e hr. SWInstalled 3 } { hr. SWInstalled. Table 1 } hr. SWInstalled. Table { hr. SWInstalled. Entry 1 hr. SWInstalled. Entry § hr. SWInstalled. Index } { hr. SWInstalled. Entry § hr. SWInstalled. Name 2 } { unknown(1), operating. System(2 § hr. SWInstalled. ID hr. SWInstalled. Entry 3 } ), § hr. SWInstalled. Type { hr. SWInstalled. Entry 4 device. Driver(3), application(4) § hr. SWInstalled. Date } { hr. SWInstalled. Entry q
hr. SWInstalled. Table Example
- Slides: 29