Home Directory

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


Remember Me

Directory Tree



byformwandler, April 2, 2012
2 of 2 people found this review helpful
1) Line 86 has a bug

elif [$ageproc -gt $warning ]

elif [ $ageproc -gt $warning ]

2) Minor improvements I made

a) nbproc

The "comm,args" options should be changed to "comm" only, otherwise the calculated number of processes is always increased by 1.

nbproc=$(ps -A -o comm | grep -w $proc | grep -v $0 | wc -l)

b) Output

The output should always begin with w.g. "CRITICAL: ", "WARNING: " or "OK: ".
Owner's reply

Thanks for the advices, my script has been updated.

byformwandler, April 2, 2012
The time calculated in seconds is wrong on my actual Linux system. check_proc_age.sh works better.