[Nagiosplug-devel] [ nagiosplug-New Plugins-744254 ] check_cpuload
SourceForge.net
noreply at sourceforge.net
Wed May 28 01:00:06 CEST 2003
New Plugins item #744254, was opened at 2003-05-27 13:22
Message generated for change (Comment added) made by doffen24
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: Tommy Fallsen (doffen24)
Date: 2003-05-28 07: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 07: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 07: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 06: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 13: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