이 콘텐츠는 선택한 언어로 제공되지 않습니다.
24.6.4. Retrieving Performance Data over SNMP
The Net-SNMP Agent in Red Hat Enterprise Linux provides a wide variety of performance information over the SNMP protocol. In addition, the agent can be queried for a listing of the installed RPM packages on the system, a listing of currently running processes on the system, or the network configuration of the system.
This section provides an overview of OIDs related to performance tuning available over SNMP. It assumes that the net-snmp-utils package is installed and that the user is granted access to the SNMP tree as described in Section 24.6.3.2, “Configuring Authentication”.
24.6.4.1. 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. Table 24.3, “Available OIDs” summarizes the different OIDs available under that MIB.
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
:
For more information about
HOST-RESOURCES-MIB
, see the /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt
file.
24.6.4.2. 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:
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 free
command:
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:
24.6.4.3. 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:
The OIDs under
HOST-RESOURCES-MIB::hrStorageSize
and HOST-RESOURCES-MIB::hrStorageUsed
can be used to calculate the remaining capacity of each mounted file system.
I/O data is available both in
UCD-SNMP-MIB::systemStats
(ssIORawSent.0
and ssIORawRecieved.0
) and in UCD-DISKIO-MIB::diskIOTable
. The latter provides much more granular data. Under this table are OIDs for diskIONReadX
and diskIONWrittenX
, which provide counters for the number of bytes read from and written to the block device in question since the system boot:
24.6.4.4. Network Information 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
The
Interfaces MIB
provides information on network devices. IF-MIB::ifTable
provides an SNMP table with an entry for each interface on the system, the configuration of the interface, and various packet counters for the interface. The following example shows the first few columns of ifTable
on a system with two physical network interfaces:
Network traffic is available under the OIDs
IF-MIB::ifOutOctets
and IF-MIB::ifInOctets
. The following SNMP queries will retrieve network traffic for each of the interfaces on this system: