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

Check Unix Process

Current Version
1.4
Last Release Date
2014-12-01
Compatible With
  • Nagios 3.x
  • Nagios 4.x
Owner
License
GPL
Hits
43501
Files:
FileDescription
check_processOrignal version
check_processSecond public release
check_processCheck GitHub for the latest version
check_processcheck_process
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!
This Unix perl script checks if a process is running and its CPU, Memory, RSS or VSZ (or all of the above) if selects processes and their children and aggregates the data. It can find the process by name, arguments or by reading a .pid file. The script supports custom return messages, performance data and is event handler friendly.

Check the GitHub link for the latest versions
::Process Resource Usage Check Instructions::

-h|help, Display this help information
-C|Check, Specify a check type: PCPU(%), ICPU(%), ACPU(%), Memory(%), VSZ, RSS,
IO, stats
PCPU uses the ps command.
ICPU uses top with a 1 second sample rather than using the average from ps.
ACPU uses the files under /proc/ to get the average CPU since the last check run.
IO uses the files under /proc/ to get the average disk/cache IO since last run.
Note: The ACPU and IO options only works with a PID file (see below)
stats will report CPU,Memory, VSZ and RSS by default
It will only alert if the process is not running
***These options only work is you are checking via a .pid file***
-nochildren Do not include children in the data collected.
-diskio, Add disk IO information to stats check
-average_cpu, Add average cpu (ACPU) information to stats check
***These options are for the stats and ACPU checks only***
-multicpu, Use CPU values like that of top and ps rather than true percantages
With this option the max cpu usage is 100% * number of logical cores
Without this option max cpu usage is 100%
***The following options only work for the CPU and memory checks***
-w|warning, Specify a warning level for the check
The default is 60 percent or 1000000 kilobytes
-c|critical, Specify a critical level for the check
The default is 70 percent or 2000000 kilobytes
-M|message, Specify a message to return on failure
-R|startup, The script to use to restart the process
If selected this will be added the the output on CRITICAL
This is an easy way to pass information to an Event Handler
***Highly reccomended that you use this***
-N|name, Specify a differnet name for the process
This is for display in Nagios messages
Example: check_process.sh -P /var/run/mysqld.pid -N MasterDB
The mysqld process will be monitored and the Nagios message will read:
The MasterDB process is currently OK.
***Only use one of the following***
-p|processname, Specify a process name to be monitored
-a|argument, Specify a process with the following argument in the
command line to be monitored
-P|PID, Specify a PID file containg the PID to be monitored
***Note: Checks by PID file include all children (by default), but not grandchildren***