Linux

Linux Process CPU Utilisation

Description:

A check plugin to look at process CPU and Memory utilization

Current Version

1

Last Release Date

2014-01-18

Compatible With

  • Nagios 3.x
  • Nagios XI

License

GPL


Project Photos
Project Notes
A check plugin for Nagios to monitor processes and their utilization of system resources. This plugin takes in a process name and then uses the command ps to work out how much memory and cpu all the processes of that name are taking up in percentage. It will output performance data for CPU Usage Percentage, Memory Usage Percentage, VSZ, RSS and the number of processes of that name. Options Only the -p option is required all other options are optional. -p allows you to specify the name of the process you want to monitor (REQUIRED) -w specify a warning for CPU percentage utilization -c specify a critical for CPU percentage utilization -m specify a warning for Memory percentage utilization -n specify a critical fro Memory percentage utilization Examples To monitor the apache processes and warn when the CPU uses over 20% and critical when over 30% ./check_cpu_proc.sh -p apache -w 20 -c 30 OK /usr/sbin/apache2 CPU: 0% MEM: 1.5% over 6 processes | proc=6 mem=1.5% cpu=0% rss=42116.0KB vsz=1274760.0KB To monitor apache processes and warn when the CPU uses over 20% and critical when over 30% . Warn when memory is over 0.2% and Critical when memory is over 0.4% ./check_cpu_proc.sh -p apache -w 20 -c 30 -m 0.2 -n 0.4 CRITICAL /usr/sbin/apache2 CPU: 0% MEM: 1.5% over 6 processes | proc=6 mem=1.5% cpu=0% rss=42116.0KB vsz=1274760.0KB To monitor nagios processes purely for performance data. i.e. no warning or criticals ./check_cpu_proc.sh -p nagios OK /usr/lib/nagios/plugins/check_ping CPU: 0% MEM: 0% over 1 processes | proc=1 mem=0% cpu=0% rss=864.0KB vsz=12408.0KB NOTE: this plugin doesn’t check whether the process is running and is purely for monitoring process utilization.
Reviews (1) Add a Review
CPU
by Clear, January 31, 2016

Thank you for the share.



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4 (1)
Favorites
0
Views
36,693