[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: monitoring load average



You're right,

I think that "vmstat 5 2" and getting the last line could give you a
good result.

Another solution (in the same direction) could be: Execute with cron 3
tasks:

	1.- Each five seconds: vmstat 5 2 >
/tmp/output.last.five.seconds
	2.- Each 60 seconds: vmstat 60 2 >
/tmp/output.last.sixty.seconds
	3.- Each 300 seconds: vmstat 300 2 > /tmp/output.last.five.mins

and modify netstat_statd plugin to make it returns those three values.

-----Mensaje original-----
De: Russell Coker [mailto:russell@coker.com.au] 
Enviado el: miércoles, 08 de enero de 2003 7:08
Para: Javier; 'Debian ISP'
Asunto: Re: monitoring load average

On Tue, 7 Jan 2003 20:15, Javier wrote:
> Perhaps you can try with vmstat. It gives you the CPU idle time, so
you
> can easily program an script that returns (100 - idle time). Use
> netsaint_statd plugin to return to netsaint server what your script
> returns.

Thanks for the suggestion.  However I still need to have a separate
script 
running vmstat as it's results are wildly inaccurate if run as "vmstat",
you 
need to run "vmstat 2" to get reliable results (and the first line won't
be 
the one you want).

I was thinking of having something like vmstat constantly running and 
periodically writing it's results to a file.

Another issue is that I don't want a load spike to trigger an alert.  So
I 
want to have an average over say a minute "vmstat 60" (which makes it 
impossible to run vmstat from the script, reading from an output file
from a 
daemon process is the only real option).

-- 
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux
packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page



Reply to: