Host Resources MIB RFC 2790 - Yen
Download
Report
Transcript Host Resources MIB RFC 2790 - Yen
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 MIB
(.1.3.6.1.4.1.311.1.7)
Microsoft WINS server MIB (.1.3.6.1.4.1.311.1.2)
Using SNMP for Network Management
MIB Object Types for Windows NT
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
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.
system group in SNMPv2-MIB [RFC1907]
interfaces group IF-MIB [RFC2233]
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 }
1. hrSystem: HR System Group
hrSystemUptime
hrSystemDate
hrSystemInitialLoadDevice
hrSystemInitialLoadParameters
hrSystemNumUsers
hrSystemProcesses
hrSystemMaxProcesses
{ hrSystem 1 }
{ hrSystem 2 }
{ hrSystem 3 }
{ hrSystem 4 }
{ hrSystem 5 }
{ hrSystem 6 }
{ hrSystem 7 }
Index of the hrDeviceEntry
hrSystem Example
java snmpwalk –c community –m HR-MIB 10.10.13.7 hrSystem
host.hrSystem.hrSystemUptime.0:
14 days, 17 hours, 10 minutes, 28 seconds.
host.hrSystem.hrSystemDate.0: 2006-4-2,9:55:14.0
host.hrSystem.hrSystemInitialLoadDevice.0: 0
host.hrSystem.hrSystemInitialLoadParameters.0:
host.hrSystem.hrSystemNumUsers.0: 2
host.hrSystem.hrSystemProcesses.0: 66
host.hrSystem.hrSystemMaxProcesses.0: 0
2. hrStorage: HR Storage Group
(Oid) hrStorageTypes
{ hrStorage 1 }
hrMemorySize (Size of RAM in Kbytes) { hrStorage 2 }
hrStorageTable
{ hrStorage 3 }
hrStorageEntry
{ hrStorageTable 1 }
hrStorageIndex
hrStorageType
hrStorageDescr
hrStorageAllocationUnits
hrStorageSize
hrStorageUsed
hrStorageAllocationFailures
{ hrStorageEntry 1 }
{ hrStorageEntry 2 }
{ hrStorageEntry 3 }
{ hrStorageEntry 4 }
{ hrStorageEntry 5 }
{ hrStorageEntry 6 }
{ hrStorageEntry 7 }
hrStorage Example
host.hrStorage.hrMemorySize.0: 1031472 (KBytes) ≒ 0.98 GBytes
(bytes)
java getTable 127.0.0.1 community hrStorageTable “HR-MIB HR-TYPES”
> hrStorageTable.html
Php Example:
realtable.php
<?php
snmp_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
Example
hrStorageDescr:
C:\...
hrStorageAllocationUnits:
4096
hrStorageSize:
11442296
hrStorageUsed:
4739161
Disk Capacity: (bytes)
11442296 * 4096 = 46867644416
Available Disk Space: (%)
(11442296-4739161)/11442296 *100% = 58.6 %
3. hrDevice: HR Device Group
(Oid) hrDeviceTypes
hrDeviceTable
hrProcessorTable
hrNetworkTable
hrPrinterTable
hrDiskStorageTable
hrPartitionTable
hrFSTable
{ hrDevice 1 }
{ hrDevice 2 }
{ hrDevice 3 }
{ hrDevice 4 }
{ hrDevice 5 }
{ hrDevice 6 }
{ hrDevice 7 }
{ hrDevice 8 }
hrDeviceTable
- The table of devices contained by the host
hrDeviceTable
hrDeviceEntry
hrDeviceIndex
hrDeviceType
hrDeviceDescr
hrDeviceID
hrDeviceStatus
hrDeviceErrors
{ hrDevice 2 }
{ hrDeviceTable 1 }
{ hrDeviceEntry 1 }
{ hrDeviceEntry 2 }
{ hrDeviceEntry 3 }
{ hrDeviceEntry 4 }
{ hrDeviceEntry 5 }
{ hrDeviceEntry 6 }
hrDeviceTable Example
hrProcessorTable
- The table of processors
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.
hrDeviceIndex
hrNetworkTable
- The table of network devices
hrNetworkTable
hrNetworkEntry
hrNetworkIfIndex
hrDeviceIndex
ifTable:
{ hrDevice 4 }
{ hrNetworkTable 1 }
{ hrNetworkEntry 1 }
hrPrinterTable
hrPrinterTable
{ hrDevice 5 }
hrPrinterEntry
hrPrinterStatus
{ hrPrinterTable 1 }
{ hrPrinterEntry 1 }
other(1), unknown(2), idle(3), printing(4), warmup(5)
hrPrinterDetectedErrorState
Bits:
{ hrPrinterEntry 2 }
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
0: lowPaper
1: noPaper
2: lowToner
3: noToner
4: doorOpen
5: jammed
6: offline
7: serviceRequested
8: inputTrayMissing
9: outputTrayMissing
10: markerSupplyMissing
11: outputNearFull
12: outputFull
13: inputTrayEmpty
14: overduePreventMaint
hrDiskStorageTable
- The table of long-term storage devices
hrDiskStorageTable
hrDiskStorageEntry
hrDiskStorageAccess
hrDiskStorageMedia
hrDiskStorageRemoveble
hrDiskStorageCapacity
{ hrDevice 6 }
{ hrDiskStorageTable 1 }
{ hrDiskStorageEntry 1 }
{ hrDiskStorageEntry 2 }
{ hrDiskStorageEntry 3 }
{ hrDiskStorageEntry 4 }
hrDiskStorageTable Example
KBytes
hrDeviceIndex
hrPartitionTable
- The table of partitions for long-term storage devices
hrPartitionTable
hrPartitionEntry
hrPartitionIndex
hrPartitionLabel
hrPartitionID
hrPartitionSize
hrPartitionFSIndex
{ hrDevice 7 }
{ hrPartitionTable 1 }
{ hrPartitionEntry 1 }
{ hrPartitionEntry 2 }
{ hrPartitionEntry 3 }
{ hrPartitionEntry 4 }
{ hrPartitionEntry 5 }
FS: File System
hrPartitionTable Example
KBytes
hrDeviceIndex
hrPartitionIndex
1
2
3
4
5
hrFSTable
- The table of file systems local or remotely mounted
hrFSTable
hrFSEntry
hrFSIndex
hrFSMountPoint
hrFSRemoteMountPoint
hrFSType
hrFSAccess
hrFSBootable
hrFSStorageIndex
hrFSLastFullBackupDate
hrFSLastPartialBackupDate
{ hrDevice 8 }
{ hrFSTable 1 }
{ hrFSEntry 1 }
{ hrFSEntry 2}
{ hrFSEntry 3 }
{ hrFSEntry 4 }
{ hrFSEntry 5 }
{ hrFSEntry 6 }
{ hrFSEntry 7 }
{ hrFSEntry 8 }
{ hrFSEntry 9 }
hrFSTable Example
January 1, year 0000, 00:00:00.0
4. hrSWRun: HR Running Software Group
hrSWOSIndex
hrSWRunTable
hrSWRunEntry
hrSWRunIndex
hrSWRunName
hrSWRunID
hrSWRunPath
hrSWRunParameters
hrSWRunType
hrSWRunStatus
unknown(1),
hrSWRunType: operatingSystem(2),
deviceDriver(3),
application(4)
{ hrSWRun 1 }
{ hrSWRun 2 }
{ hrSWRunTable 1 }
{ hrSWRunEntry 1 }
{ hrSWRunEntry 2 }
{ hrSWRunEntry 3 }
{ hrSWRunEntry 4 }
{ hrSWRunEntry 5 }
{ hrSWRunEntry 6 }
{ hrSWRunEntry 7 }
running(1),
hrSWRunStatus: runnable(2),
notRunnable(3),
invalid(4)
hrSWRunTable Example
- The table of software running on the host
hrSWRun.hrSWOSIndex.0: 4
5. hrSWRunPerf:
HR Running Software Performance Group
hrSWRunPerfTable
{ hrSWRunPerf 1 }
- The table of running software performance metrics
hrSWRunPerfEntry
hrSWRunPerfCPU
{ hrSWRunPerfTable 1 }
{ 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)
hrSWRunPerfTable Example
hrSWRunTable
hrSWRunPerfTable
=
=
=
=
=
6. hrSWInstalled:
HR Installed Software Group
{ hrSWInstalled 1 }
hrSWInstalledLastChange
hrSWInstalledLastUpdateTime { hrSWInstalled 2 }
{ hrSWInstalled 3 }
hrSWInstalledTable
hrSWInstalledEntry
hrSWInstalledIndex
hrSWInstalledName
hrSWInstalledID
unknown(1),
operatingSystem(2), hrSWInstalledType
deviceDriver(3),
application(4)
hrSWInstalledDate
{ hrSWInstalledTable 1 }
{ hrSWInstalledEntry 1 }
{ hrSWInstalledEntry 2 }
{ hrSWInstalledEntry 3 }
{ hrSWInstalledEntry 4 }
{ hrSWInstalledEntry 5 }
hrSWInstalledTable Example