From 1f70b1c7e37b4e378e91dff1a16310fd8381e429 Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Fri, 28 Sep 2001 19:16:59 +0000 Subject: [PATCH] readded code to calc number of jobs that was removed by mistake --- src/lib/Spong/Client/plugins/check_cpu | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/Spong/Client/plugins/check_cpu b/src/lib/Spong/Client/plugins/check_cpu index d7b5c11..bc59d11 100755 --- a/src/lib/Spong/Client/plugins/check_cpu +++ b/src/lib/Spong/Client/plugins/check_cpu @@ -4,7 +4,7 @@ $CHECKFUNCS{'cpu'} = \&check_cpu; # 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); @@ -19,6 +19,7 @@ sub check_cpu { 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 -- 2.30.2