host resources mib - rfc 2790 yen-cheng chen im, ncnu

29
Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

Upload: samson-powell

Post on 05-Jan-2016

232 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

Host Resources MIB- RFC 2790

Yen-Cheng ChenIM, NCNU

Page 2: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

MIBs Supported in Windows XP 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 MI

B

(.1.3.6.1.4.1.311.1.7) Microsoft WINS server MIB

(.1.3.6.1.4.1.311.1.2) MIB Object Types for Windows NT

Using SNMP for Network Management

Page 3: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

References

RFCs RFC 2790: Host Resources MIB

Modules: HOST-RESOURCES-MIB ( HR-MIB ) HOST-RESOURCES-TYPES ( HR-

TYPES )Lab. Files (php)• http://ycchen.im.ncnu.edu.tw/nm/hr-php.zip

Lab. Files (Java projects):• snmpwalk.java, getTable.java• http://www.im.ncnu.edu.tw/ycchen/nm/getTable.zip

Page 4: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

Management of Host Computers Host Resources MIB defines a uniform

set of objects useful for the management of host computers.

Objects which also provide host management functionality. systemsystem group in SNMPv2-MIB [RFC1907] interfacesinterfaces group IF-MIB [RFC2233]

Page 5: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

Groups of Host Resources MIB host OBJECT IDENTIFIER ::= { mib-2 25 }

1.3.6.1.2.1.25

6 Groups: hrSystem OBJECT IDENTIFIER ::= { host 1 } hrStorage OBJECT IDENTIFIER ::= { host 2 } hrDevice OBJECT IDENTIFIER ::= { host 3 } hrSWRun OBJECT IDENTIFIER ::= { host 4 } hrSWRunPerf OBJECT IDENTIFIER ::= { host 5 } hrSWInstalled OBJECT IDENTIFIER ::= { host 6 }

hrMIBAdminInfo OBJECT IDENTIFIER ::= { host 7 }

Page 6: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

1. hrSystem: HR System Group

hrSystemUptime { hrSystem 1 } hrSystemDate { hrSystem 2 } hrSystemInitialLoadDevice { hrSystem 3 } hrSystemInitialLoadParameters { hrSystem 4 } hrSystemNumUsers { hrSystem 5 } hrSystemProcesses { hrSystem 6 } hrSystemMaxProcesses { hrSystem 7 }

Index of the hrDeviceEntry

Page 7: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

hrSystem Example

host.hrSystem.hrSystemUptime.0: 14 days, 17 hours, 10 minutes, 28

seconds.host.hrSystem.hrSystemDate.0: 2006-4-

2,9:55:14.0host.hrSystem.hrSystemInitialLoadDevice.0: 0host.hrSystem.hrSystemInitialLoadParameters.0: host.hrSystem.hrSystemNumUsers.0: 2host.hrSystem.hrSystemProcesses.0: 66host.hrSystem.hrSystemMaxProcesses.0: 0

java snmpwalk –c community –m HR-MIB 10.10.13.7 hrSystem

Page 8: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

2. hrStorage: HR Storage Group (Oid) hrStorageTypes { hrStorage 1 } hrMemorySize { hrStorage 2 } hrStorageTable { hrStorage 3 }

hrStorageEntry { hrStorageTable 1 } hrStorageIndex { hrStorageEntry 1 } hrStorageType { hrStorageEntry 2 } hrStorageDescr { hrStorageEntry 3 } hrStorageAllocationUnits { hrStorageEntry 4 } hrStorageSize { hrStorageEntry 5 } hrStorageUsed { hrStorageEntry 6 } hrStorageAllocationFailures { hrStorageEntry

7 }

(Size of RAM in Kbytes)

Page 9: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

hrStorage Example host.hrStorage.hrMemorySize.0: 1031472(KBytes)

java getTable 127.0.0.1 community hrStorageTable “HR-MIB HR-TYPES” > hrStorageTable.html

(bytes)

≒ 0.98 GBytes

Page 10: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

Php Example:

<?phpsnmp_set_quick_print(true);snmp_read_mib("hrTypes.txt");$host = "127.0.0.1";$community = "public";$oid = "HOST-RESOURCES-MIB::hrStorageTable";

$arr = realtable($host, $community, $oid, 7);…?>

C:\usr\mibs\HOST-RESOURCES-TYPES.txt

realtable.php

Page 11: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

ExamplehrStorageDescr:

C:\...hrStorageAllocationUnits:

4096hrStorageSize:

11442296hrStorageUsed:

4739161Disk Capacity: (bytes) 11442296 * 4096 = 46867644416Available Disk Space: (%) (11442296-4739161)/11442296 *100% = 58.6 %

Page 12: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

3. hrDevice: HR Device Group (Oid) hrDeviceTypes { hrDevice 1 } hrDeviceTable { hrDevice 2 } hrProcessorTable { hrDevice 3 } hrNetworkTable { hrDevice 4 } hrPrinterTable { hrDevice 5 } hrDiskStorageTable { hrDevice 6 } hrPartitionTable { hrDevice 7 } hrFSTable { hrDevice 8 }

Page 13: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

hrDeviceTable

hrDeviceTable { hrDevice 2 } hrDeviceEntry { hrDeviceTable 1

} hrDeviceIndex { hrDeviceEntry 1 } hrDeviceType { hrDeviceEntry 2 } hrDeviceDescr { hrDeviceEntry 3 } hrDeviceID { hrDeviceEntry 4 } hrDeviceStatus { hrDeviceEntry 5 } hrDeviceErrors { hrDeviceEntry 6 }

- The table of devices contained by the host

Page 14: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

hrDeviceTable Example

Page 15: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

hrProcessorTable

hrProcessorTable { hrDevice 3 } hrProcessorEntry { hrProcessorTable 1 }

hrProcessorFrwID { hrProcessorEntry 1 }- Product ID of Firmware

hrProcessorLoad { hrProcessorEntry 2 }- The average, over the last minute, of the

percentage of time that this processor was not idle.

hrDeviceIndexhrDeviceIndex

- The table of processors

Page 16: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

hrNetworkTable

hrNetworkTable { hrDevice 4 } hrNetworkEntry { hrNetworkTable 1 }

hrNetworkIfIndex { hrNetworkEntry 1 }

hrDeviceIndexhrDeviceIndex

ifTable:

- The table of network devices

Page 17: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

hrPrinterTable hrPrinterTable

{ hrDevice 5 } hrPrinterEntry

{ hrPrinterTable 1 } hrPrinterStatus

{ hrPrinterEntry 1 }

hrPrinterDetectedErrorState

{ hrPrinterEntry 2 }

other(1), unknown(2), idle(3), printing(4), warmup(5)

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

0: lowPaper1: noPaper2: lowToner3: noToner4: doorOpen

5: jammed6: offline7: serviceRequested8: inputTrayMissing9: outputTrayMissing

10: markerSupplyMissing 11: outputNearFull 12: outputFull13: inputTrayEmpty14: overduePreventMaint

Bits:

Page 18: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

hrDiskStorageTable

hrDiskStorageTable { hrDevice 6 } hrDiskStorageEntry { hrDiskStorageTable

1 } hrDiskStorageAccess

{ hrDiskStorageEntry 1 } hrDiskStorageMedia

{ hrDiskStorageEntry 2 } hrDiskStorageRemoveble

{ hrDiskStorageEntry 3 } hrDiskStorageCapacity

{ hrDiskStorageEntry 4 }

- The table of long-term storage devices

Page 19: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

hrDiskStorageTable Example

hrDeviceIndexhrDeviceIndex

KBytes

Page 20: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

hrPartitionTable

hrPartitionTable { hrDevice 7 } hrPartitionEntry { hrPartitionTable

1 } hrPartitionIndex { hrPartitionEntry 1 } hrPartitionLabel { hrPartitionEntry 2 } hrPartitionID { hrPartitionEntry 3 } hrPartitionSize { hrPartitionEntry 4 } hrPartitionFSIndex { hrPartitionEntry 5 }

- The table of partitions for long-term storage devices

FS: File System

Page 21: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

hrPartitionTable Example

hrDeviceIndexhrDeviceIndexhrPartitionIndexhrPartitionIndex

KBytes

12345

Page 22: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

hrFSTable

hrFSTable { hrDevice 8 } hrFSEntry { hrFSTable 1 }

hrFSIndex { hrFSEntry 1 } hrFSMountPoint { hrFSEntry 2} hrFSRemoteMountPoint { hrFSEntry 3 } hrFSType { hrFSEntry 4 } hrFSAccess { hrFSEntry 5 } hrFSBootable { hrFSEntry 6 } hrFSStorageIndex { hrFSEntry 7 } hrFSLastFullBackupDate { hrFSEntry 8 } hrFSLastPartialBackupDate

{ hrFSEntry 9 }

- The table of file systems local or remotely mounted

Page 23: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

hrFSTable Example

January 1, year 0000, 00:00:00.0

Page 24: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

4. hrSWRun: HR Running Software Group hrSWOSIndex{ hrSWRun 1 } hrSWRunTable { hrSWRun 2 }

hrSWRunEntry { hrSWRunTable 1 } hrSWRunIndex{ hrSWRunEntry 1 } hrSWRunName { hrSWRunEntry 2 } hrSWRunID { hrSWRunEntry 3 } hrSWRunPath { hrSWRunEntry 4 } hrSWRunParameters { hrSWRunEntry 5 } hrSWRunType { hrSWRunEntry 6 } hrSWRunStatus { hrSWRunEntry 7 }

unknown(1), operatingSystem(2), deviceDriver(3), application(4)

running(1), runnable(2),notRunnable(3),invalid(4)

hrSWRunType: hrSWRunStatus:

Page 25: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

hrSWRunTable Example

hrSWRun.hrSWOSIndex.0: 4

- The table of software running on the host

Page 26: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

5. hrSWRunPerf: HR Running Software Performance Group

hrSWRunPerfTable { hrSWRunPerf 1 }

hrSWRunPerfEntry { hrSWRunPerfTable 1 } hrSWRunPerfCPU { hrSWRunPerfEntry 1 } - Number of centi-seconds of the CPU resources consumed by this process. hrSWRunPerfMem { hrSWRunPerfEntry 2 } - The total amount of real system memory allocated

to this process. (in Kbytes)

- The table of running software performance metrics

Page 27: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

hrSWRunPerfTable Example hrSWRunPerfTablehrSWRunTable

=

=

=

=

=

Page 28: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

6. hrSWInstalled: HR Installed Software Group

hrSWInstalledLastChange hrSWInstalledLastUpdateT

ime hrSWInstalledTable

hrSWInstalledEntry hrSWInstalledIndex hrSWInstalledName hrSWInstalledID hrSWInstalledType hrSWInstalledDate

unknown(1), operatingSystem(2), deviceDriver(3), application(4)

{ hrSWInstalled

1 }

{ hrSWInstalled

2 }

{ hrSWInstalled

3 }

{ hrSWInstalledTa

ble 1 }

{ hrSWInstalledEn

try 1 }

{ hrSWInstalledEn

try 2 }

{ hrSWInstalledEn

try 3 }

{ hrSWInstalledEn

try 4 }

{ hrSWInstalledEn

try 5 }

Page 29: Host Resources MIB - RFC 2790 Yen-Cheng Chen IM, NCNU

hrSWInstalledTable Example