# This routine checks the 5min CPU load avg from the uptime comand. This
# check also return a status of warning if the uptime is less then 1 hour.
-# $Id: check_cpu,v 1.2 2001/09/16 18:08:39 sljohnson Exp $
+# $Id: check_cpu,v 1.3 2001/09/28 19:16:59 sljohnson Exp $
use Spong::SafeExec qw(safe_exec);
my @msg = safe_exec($PS,30);
for ( 0..10 ) { $message .= $msg[$_] };
+ $jobs = $#msg; # num of jobs is 1 less number of entries in @msg
# Check to see if the system has only been up a short time, and if it has
# only been less then an hour, send a page