[Nagiosplug-devel] [ nagiosplug-New Plugins-744254 ] check_cpuload
SourceForge.net
noreply at sourceforge.net
Wed May 28 02:44:05 CEST 2003
New Plugins item #744254, was opened at 2003-05-27 15:22
Message generated for change (Comment added) made by rkarlsba
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=541465&aid=744254&group_id=29880
Category: Perl plugin
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Roy Sigurd Karlsbakk (rkarlsba)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_cpuload
Initial Comment:
Simple perl plugin to check for CPU load on local linux machines
using the sysstat package (sar)
----------------------------------------------------------------------
>Comment By: Roy Sigurd Karlsbakk (rkarlsba)
Date: 2003-05-28 11:43
Message:
Logged In: YES
user_id=145309
Added new version.
This can actually be called usable.
Solaris and linux support.
----------------------------------------------------------------------
Comment By: Tommy Fallsen (doffen24)
Date: 2003-05-28 10:47
Message:
Logged In: YES
user_id=788346
The output is solaris
----------------------------------------------------------------------
Comment By: Roy Sigurd Karlsbakk (rkarlsba)
Date: 2003-05-28 10:35
Message:
Logged In: YES
user_id=145309
Can you send me the output from this on your solaris box?
perl -e 'print "$^O\n"'
----------------------------------------------------------------------
Comment By: Tommy Fallsen (doffen24)
Date: 2003-05-28 09:59
Message:
Logged In: YES
user_id=788346
Its your script so you should rewrite it if you want to. This is
how i changed it , and below is what sar 1 3 gives in Solaris
(its the same for OS versions 2.6, 7 , and 8).
if (/^Average/) {
@values = split(/\s+/);
$user = $values[1];
$system = $values[2];
$iowait = $values[3];
$idle = $values[4];
$stop = 1;
}
SunOS ask 5.8 Generic_108528-21 sun4u 05/28/03
09:57:24 %usr %sys %wio %idle
09:57:25 2 13 0 85
09:57:26 2 2 0 96
09:57:27 1 12 1 86
Average 2 9 0 89
SunOS levanger 5.6 Generic_105181-31 sun4u 05/28/03
09:58:31 %usr %sys %wio %idle
09:58:32 18 7 19 56
09:58:33 22 13 16 50
09:58:34 23 16 13 49
Average 21 12 16 52
----------------------------------------------------------------------
Comment By: Roy Sigurd Karlsbakk (rkarlsba)
Date: 2003-05-28 09:39
Message:
Logged In: YES
user_id=145309
What if you rewrite it to support Solaris?
Then we can do an OS check before running sar.
----------------------------------------------------------------------
Comment By: Tommy Fallsen (doffen24)
Date: 2003-05-28 09:33
Message:
Logged In: YES
user_id=788346
Ignore last comment, output of sar in solaris too different.
Sorry
----------------------------------------------------------------------
Comment By: Tommy Fallsen (doffen24)
Date: 2003-05-28 08:58
Message:
Logged In: YES
user_id=788346
If you remove : in if (/^Average:/) { it will work in Solaris too.
----------------------------------------------------------------------
Comment By: Roy Sigurd Karlsbakk (rkarlsba)
Date: 2003-05-27 15:27
Message:
Logged In: YES
user_id=145309
WARNING
This isn't finished
This is only for testing and further development
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=541465&aid=744254&group_id=29880
More information about the Devel
mailing list