English Korean
Hardware Configuration
The `Host Resources MIB` included with Net-SNMP presents information about the current hardware and software configuration of a host to a client utility. xref:System_Monitoring_Tools.adoc#tabl-System_Monitoring_Tools-Net-SNMP-OIDs[Available OIDs] summarizes the different OIDs available under that MIB.
Available OIDs
|OID|Description
|`HOST-RESOURCES-MIB::hrSystem`|Contains general system information such as uptime, number of users, and number of running processes.
|`HOST-RESOURCES-MIB::hrStorage`|Contains data on memory and file system usage.
|`HOST-RESOURCES-MIB::hrDevices`|Contains a listing of all processors, network devices, and file systems.
|`HOST-RESOURCES-MIB::hrSWRun`|Contains a listing of all running processes.
|`HOST-RESOURCES-MIB::hrSWRunPerf`|Contains memory and CPU statistics on the process table from HOST-RESOURCES-MIB::hrSWRun.
|`HOST-RESOURCES-MIB::hrSWInstalled`|Contains a listing of the RPM database.
There are also a number of SNMP tables available in the Host Resources MIB which can be used to retrieve a summary of the available information. The following example displays `HOST-RESOURCES-MIB::hrFSTable`:
~]$ [command]#snmptable -Cb localhost HOST-RESOURCES-MIB::hrFSTable#
SNMP table: HOST-RESOURCES-MIB::hrFSTable
Index MountPoint RemoteMountPoint Type
Access Bootable StorageIndex LastFullBackupDate LastPartialBackupDate
1 "/" "" HOST-RESOURCES-TYPES::hrFSLinuxExt2
readWrite true 31 0-1-1,0:0:0.0 0-1-1,0:0:0.0
5 "/dev/shm" "" HOST-RESOURCES-TYPES::hrFSOther
readWrite false 35 0-1-1,0:0:0.0 0-1-1,0:0:0.0
6 "/boot" "" HOST-RESOURCES-TYPES::hrFSLinuxExt2
readWrite false 36 0-1-1,0:0:0.0 0-1-1,0:0:0.0
For more information about `HOST-RESOURCES-MIB`, see the `/usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt` file.
CPU and Memory Information
Most system performance data is available in the `UCD SNMP MIB`. The `systemStats` OID provides a number of counters around processor usage:
~]$ [command]#snmpwalk localhost UCD-SNMP-MIB::systemStats#
UCD-SNMP-MIB::ssIndex.0 = INTEGER: 1
UCD-SNMP-MIB::ssErrorName.0 = STRING: systemStats
UCD-SNMP-MIB::ssSwapIn.0 = INTEGER: 0 kB
UCD-SNMP-MIB::ssSwapOut.0 = INTEGER: 0 kB
UCD-SNMP-MIB::ssIOSent.0 = INTEGER: 0 blocks/s
UCD-SNMP-MIB::ssIOReceive.0 = INTEGER: 0 blocks/s
UCD-SNMP-MIB::ssSysInterrupts.0 = INTEGER: 29 interrupts/s
UCD-SNMP-MIB::ssSysContext.0 = INTEGER: 18 switches/s
UCD-SNMP-MIB::ssCpuUser.0 = INTEGER: 0
UCD-SNMP-MIB::ssCpuSystem.0 = INTEGER: 0
UCD-SNMP-MIB::ssCpuIdle.0 = INTEGER: 99
UCD-SNMP-MIB::ssCpuRawUser.0 = Counter32: 2278
UCD-SNMP-MIB::ssCpuRawNice.0 = Counter32: 1395
UCD-SNMP-MIB::ssCpuRawSystem.0 = Counter32: 6826
UCD-SNMP-MIB::ssCpuRawIdle.0 = Counter32: 3383736
UCD-SNMP-MIB::ssCpuRawWait.0 = Counter32: 7629
UCD-SNMP-MIB::ssCpuRawKernel.0 = Counter32: 0
UCD-SNMP-MIB::ssCpuRawInterrupt.0 = Counter32: 434
UCD-SNMP-MIB::ssIORawSent.0 = Counter32: 266770
UCD-SNMP-MIB::ssIORawReceived.0 = Counter32: 427302
UCD-SNMP-MIB::ssRawInterrupts.0 = Counter32: 743442
UCD-SNMP-MIB::ssRawContexts.0 = Counter32: 718557
UCD-SNMP-MIB::ssCpuRawSoftIRQ.0 = Counter32: 128
UCD-SNMP-MIB::ssRawSwapIn.0 = Counter32: 0
UCD-SNMP-MIB::ssRawSwapOut.0 = Counter32: 0
In particular, the `ssCpuRawUser`, `ssCpuRawSystem`, `ssCpuRawWait`, and `ssCpuRawIdle` OIDs provide counters which are helpful when determining whether a system is spending most of its processor time in kernel space, user space, or I/O. `ssRawSwapIn` and `ssRawSwapOut` can be helpful when determining whether a system is suffering from memory exhaustion.
More memory information is available under the `UCD-SNMP-MIB::memory` OID, which provides similar data to the [command]#free# command:
~]$ [command]#snmpwalk localhost UCD-SNMP-MIB::memory#
UCD-SNMP-MIB::memIndex.0 = INTEGER: 0
UCD-SNMP-MIB::memErrorName.0 = STRING: swap
UCD-SNMP-MIB::memTotalSwap.0 = INTEGER: 1023992 kB
UCD-SNMP-MIB::memAvailSwap.0 = INTEGER: 1023992 kB
UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 1021588 kB
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 634260 kB
UCD-SNMP-MIB::memTotalFree.0 = INTEGER: 1658252 kB
UCD-SNMP-MIB::memMinimumSwap.0 = INTEGER: 16000 kB
UCD-SNMP-MIB::memBuffer.0 = INTEGER: 30760 kB
UCD-SNMP-MIB::memCached.0 = INTEGER: 216200 kB
UCD-SNMP-MIB::memSwapError.0 = INTEGER: noError(0)
UCD-SNMP-MIB::memSwapErrorMsg.0 = STRING:
Load averages are also available in the `UCD SNMP MIB`. The SNMP table `UCD-SNMP-MIB::laTable` has a listing of the 1, 5, and 15 minute load averages:
~]$ [command]#snmptable localhost UCD-SNMP-MIB::laTable#
SNMP table: UCD-SNMP-MIB::laTable
laIndex laNames laLoad laConfig laLoadInt laLoadFloat laErrorFlag laErrMessage
1 Load-1 0.00 12.00 0 0.000000 noError
2 Load-5 0.00 12.00 0 0.000000 noError
3 Load-15 0.00 12.00 0 0.000000 noError
File System and Disk Information
The `Host Resources MIB` provides information on file system size and usage. Each file system (and also each memory pool) has an entry in the `HOST-RESOURCES-MIB::hrStorageTable` table:
~]$ [command]#snmptable -Cb localhost HOST-RESOURCES-MIB::hrStorageTable#
SNMP table: HOST-RESOURCES-MIB::hrStorageTable