check_load --- divide by number of cpus?

Sandor W. Sklar ssklar at stanford.edu
Thu May 8 16:34:27 CEST 2008


On May 8, 2008, at 6:49 AM, Terry wrote:

> I am sitting here racking my brain on this one.  Is dividing the load
> average by the number of CPUs a smart thing to do?  the 'uptime'
> command on a box does not do this.  So, if I have an 8 core box
> sitting with a load average of 8, its the same as a single core box
> sitting with a load average of 1?  I'll see the same type of server
> response?  Thoughts?

This is what we do on our Sun boxes, in a custom "check_system" script:

# Set 1,5,15 minute load average thresholds based on CPU count
CPU=`psrinfo | wc -l`
LOAD1=$((CPU*20)); test $LOAD1 -lt 50 && LOAD1=50
LOAD5=$((CPU*15)); test $LOAD5 -lt 30 && LOAD5=30
LOAD15=$((CPU*10)); test $LOAD15 -lt 15 && LOAD15=15

LOAD_W=$LOAD1,$LOAD5,$LOAD15
LOAD_C=$((LOAD1*5)),$((LOAD5*5)),$((LOAD15*5))

... and on our linux systems ...

CPU=`grep "^processor" /proc/cpuinfo | wc -l`
LOAD1=$((CPU*20)); test $LOAD1 -lt 50 && LOAD1=50
LOAD5=$((CPU*15)); test $LOAD5 -lt 30 && LOAD5=30
LOAD15=$((CPU*10)); test $LOAD15 -lt 15 && LOAD15=15

LOAD_W=$LOAD1,$LOAD5,$LOAD15
LOAD_C=$((LOAD1*5)),$((LOAD5*5)),$((LOAD15*5))

... and we then parse the output of "uptime".

It would really cool if the "check_load" plugin would take args like:

	check_load -w 20x,15x,10x -c 100x,75x,50x

... but what I've got above has been doing what we want just fine.

	-s-

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list