Knowledge Base

Monitoring System Parameters like Memory, CPU and Disks on Linux Systems via SNMP

Diese Seite steht leider noch nicht auf Deutsch zur Verfügung. Wir bitten um Ihr Verständnis!

If you want to monitor system parameters like CPU load and memory on a Linux or UNIX system you can use the following method that uses SNMP.

1. Installing the SNMP daemon on the Linux Server

First you must install and enable the NET-SNMP library on the Linux system:
net-snmp.sourceforge.net

There is a good tutorial that explains the installation of the NET-SNMP deamon on a Debian Linux system on the DebianHelp website (this tutorial should also help on other Linux flavors.):
www.debianhelp.co.uk/snmp.htm.

 

2a. Creating sensors in IPCheck Server Monitor

Log into the web interface or use the Windows GUI to create a new server with the IP address of your Linux box. Now choose "Add Sensor" and from the list of available sensor types choose "OID/MIB library" from the "SNMP Sensors" section. In the dropdown choose the "Basic Linux Library" item and click on "OK".

You will see a progress bar while IPCheck scans the server for available sensors and a few moments later you will see IPCheck's standard sensor editing dialog. Look at the setting "Monitored Value" and choose the value that you want to monitor. Scroll down and click on OK to finalize your new sensor.

2b. Creating sensors in PRTG Traffic Grapher

In PRTG's Windows GUI click on "Add Sensor" and choose "SNMP" and click on "Next". Select "From OID/MIB Library" as your sensor type and select the "Basic Linux Library" from the dropdown. On the following page enter the IP address of your Linux server and set the other parameters as usual. On the next page you will see a list of available sensors, select the ones you want to monitor by checkíng the entries checkboxes.

3. Available Sensors of the Basic Linux Library (UCD-SNMP-MIB)

Here is a list of sensors that the Basic Linux Library supports. Depending on the OS, your system and the (security) settings inside the NET-SNMP daemon you may see less entries on your servers. Entries marked with "(Table)" will provide the measured value for several items (e.g. for each CPU, disk or network card).

Group: "Processes"

Processes Index (Table)
Reference Index for each observed process.
Processes Count (Table)
The number of current processes running with the name in question.
Processes Error Flag (Table)
A Error flag to indicate trouble with a process. It goes to 1 if there is an error, 0 if no error.

Group: "Memory"

Memory Total Swap
Total Swap Size configured for the host.
Available Swap Space
Available Swap Space on the host.
Memory Total Real
Total Real/Physical Memory Size on the host.
Available Real/Physical Memory
Available Real/Physical Memory Space on the host.
Memory Total Swap used by text
Total virtual Memory used by text.
Active virtual Memory used by text
Active virtual Memory used by text.
Memory Total Real used by text
Total Real/Physical Memory Size used by text.
Active Real/Physical Memory used by text
Active Real/Physical Memory Space used by text.
Memory Total Free
Total Available Memory on the host
Memory Shared
Total Shared Memory
Memory Buffered
Total Buffered Memory
Memory Cached
Total Cached Memory
Memory Swap Error Flag
Error flag. 1 indicates very little swap space left

Group: "Disk"

Disk index (Table)
Integer reference number (row number) for the disk mib.
Disk minimum (Table)
Minimum space required on the disk (in kBytes) before the errors are triggered. Either this or dskMinPercent is configured via the agent's snmpd.conf file.
Disk min percent (Table)
Percentage of minimum space required on the disk before the errors are triggered. Either this or dskMinimum is configured via the agent's snmpd.conf file.
Disk total (Table)
Total size of the disk/partion (kBytes)
Disk avail (Table)
Available space on the disk
Disk used (Table)
Used space on the disk
Disk percent (Table)
Percentage of space used on disk
Disk percent node (Table)
Percentage of inodes used on disk
Disk error flag (Table)
Error flag signaling that the disk or partition is under the minimum required space configured for it.

Group: "System Stats"

System Memory Swapped In
Amount of Memory swapped in from disk (kB/s).
System Memory Swapped Out
Amount of Memory swapped to disk (kB/s).
System IO sent (deprecated)
Blocks sent to a block device (blocks/s). Deprecated, replaced by the ssIORawSent object
System IO received (deprecated)
Blocks received from a block device (blocks/s). Deprecated, replaced by the ssIORawReceived object
System Interrupts (deprecated)
The number of interrupts per second, including the clock. Deprecated, replaced by ssRawInterrupts
System Context Switches (deprecated)
The number of context switches per second. Deprecated, replaced by ssRawContext
System CPU user (deprecated)
percentages of user CPU time. Deprecated, replaced by the ssCpuRawUser object
System CPU system (deprecated)
percentages of system CPU time. Deprecated, replaced by of the ssCpuRawSystem object
System CPU idle (deprecated)
percentages of idle CPU time. Deprecated, replaced by of the ssCpuRawIdle object
System CPU raw user
user CPU time in ticks per second, as reported by the kernel. Total ticks is 100xNumber of Processors. For single processor machine numbers will appear to be percentages as the kernel will tally ticks at 100 per second.
System CPU raw nice
nice CPU time in ticks per second, as reported by the kernel. Total ticks is 100xNumber of Processors. For single processor machine numbers will appear to be percentages as the kernel will tally ticks at 100 per second.
System CPU raw system
system CPU time in ticks per second, as reported by the kernel. Total ticks is 100xNumber of Processors. For single processor machine numbers will appear to be percentages as the kernel will tally ticks at 100 per second.
System CPU raw idle
idle CPU time in ticks per second, as reported by the kernel. Total ticks is 100xNumber of Processors. For single processor machine numbers will appear to be percentages as the kernel will tally ticks at 100 per second.
System CPU raw wait
iowait CPU time in ticks per second, as reported by the kernel. Total ticks is 100xNumber of Processors. For single processor machine numbers will appear to be percentages as the kernel will tally ticks at 100 per second. This is primarily a SysV thingie
System CPU raw kernel
kernel CPU time in ticks per second, as reported by the kernel. Total ticks is 100xNumber of Processors. For single processor machine numbers will appear to be percentages as the kernel will tally ticks at 100 per second.
System CPU raw interrupt
interruptlevel CPU time. in ticks per second, as reported by the kernel. Total ticks is 100xNumber of Processors. For single processor machine numbers will appear to be percentages as the kernel will tally ticks at 100 per second. This is primarily a BSD thingie
System IO raw sent
Number of blocks sent to a block device
System IO raw received
Number of blocks received from a block device
System Raw Interrupts
Number of interrupts processed
System Raw Context Switches
Number of context switches
System CPU raw soft irq
Soft IRQ CPU time. in ticks per second, as reported by the kernel. Total ticks is 100xNumber of Processors. For single processor machine numbers will appear to be percentages as the kernel will tally ticks at 100 per second. This is for Linux 2.6
System Raw Blocks Swapped In
Number of blocks swapped in
System Raw Blocks Swapped In
Number of blocks swapped out

Group: "CPU Load"

CPU Load (1 minute average)
The load average is the system load over a period of time. An idle computer has a load number of 0. Each proceSystem that is using CPU, waiting for CPU or is in uninterruptible sleep (usually waiting for disk activity) adds 1 to the load number.
CPU Load (5 minute average)
The load average is the system load over a period of time. An idle computer has a load number of 0. Each proceSystem that is using CPU, waiting for CPU or is in uninterruptible sleep (usually waiting for disk activity) adds 1 to the load number.
CPU Load (15 minute average)
The load average is the system load over a period of time. An idle computer has a load number of 0. Each proceSystem that is using CPU, waiting for CPU or is in uninterruptible sleep (usually waiting for disk activity) adds 1 to the load number.

By Category

Related Articles