Home Directory Plugins System Metrics Processes Check long running processes

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

Check long running processes

Rating
0 votes
Favoured:
0
Current Version
1.11
Last Release Date
2013-11-04
Compatible With
  • Nagios 3.x
Owner
License
GPL
Hits
30225
Files:
FileDescription
check_long_running_procs.shcheck_long_running_procs.sh
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
A plugin to check long running processes on Linux.

IMPORTANT: This script checks elapsed CPU time not elapsed run time.
This script will take multiple arguments and alert if a process has consumed more than x number of CPU days e.g:

$ check_long_running_procs.sh -w 10 -c 20
LONG RUNNING PROCESSES WARNING: there is/are 1 long running processes on `hostname`
WARNING PID 950 () from user has used 12 CPU days and has run for a total of 13 days

The script has an optional space seperated exclude list e.g

$ check_long_running_procs.sh -w 10 -c 20 -E "sge pdflush"

The script also has a hidden function which can email a user with a warning message informing them of their long running process. You can enable this by using the “-e” flag followed by your username. You will also need to set the “DOMAIN” variable to your domain name. This function assumes your email address is @ if not you might need to recode a little.

IMPORTANT: This script checks elapsed CPU time not elapsed run time. However it would be pretty easy to recode the check to report on total run time rather than CPU time.