MEMORY: Free system memory
The check of free system memory of linux systems may not be pointed directly to the information of the really ‘free’ memory, since Linux is making use of the best reasonable amount of pysical memory. Indeed, we can find the information of the memory occupied by the system but not used for current calculations as ‘buffers’ or system cache.
Therefore when checking actively for free memory resources it is useful to consider the buffers as memory available for eventual arithemtics. The check_mem makes use of the system command free and returns as result the sum of Free memory + buffers.
[root@neteye plugins]# ./check_mem.sh -w 500 -c 200 -p
OK – free system memory: 1329 MB | free memory=1329MB;500;200;0
[root@neteye plugins]# free -m
total used free shared buffers cached
Mem: 2026 1584 442 0 159 696
-/+ buffers/cache: 728 1298
Swap: 2047 0 2047
PS: make use of the ‘-p’ argument to extract also the component of the perfdata for the performance data view.
Download: Download section of this blog or Nagios Exchange ( http://exchange.nagios.org )
CPU
The performance of a Linux/Unix system can be measured by reading the load of the system.
CPU usage is distributed on today’s system mainly on multiple-core CPU’s and therefore a OS is providing multiple values to take in consideration for monitoring.
The check_cpu.py interprets the values provided by the vmstat command on the following platforms: Linux, OpenBSD, FreeBSD, NetBSD and SunOS.
[root@neteye plugins]# ./check_cpu.py -w 20 -c 5
WARNING: CPU is only 18% idle
[root@neteye plugins]# vmstat 5 2
procs ———–memory———- —swap– —–io—- –system– —–cpu——
r b swpd free buff cache si so bi bo in cs us sy id wa st
3 0 116 267424 161072 635604 0 0 60 115 0 1 34 3 61 1 0
10 0 116 162916 161088 635560 0 0 0 202 1505 3458 80 6 14 0 0
Download: Download section of this blog or Nagios Exchange ( http://exchange.nagios.org )