Home Directory Plugins Operating Systems Linux Linux Process CPU Utilisation

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Linux Process CPU Utilisation

Current Version
1
Last Release Date
2014-01-18
Compatible With
  • Nagios 3.x
  • Nagios XI
Owner
License
GPL
Hits
36701
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
A check plugin to look at process CPU and Memory utilization
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)
byClear, January 7, 2016
Thank you for the share.