RE: monitoring load average
I think that "vmstat 5 2" and getting the last line could give you a
Another solution (in the same direction) could be: Execute with cron 3
1.- Each five seconds: vmstat 5 2 >
2.- Each 60 seconds: vmstat 60 2 >
3.- Each 300 seconds: vmstat 300 2 > /tmp/output.last.five.mins
and modify netstat_statd plugin to make it returns those three values.
De: Russell Coker [mailto:firstname.lastname@example.org]
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
> can easily program an script that returns (100 - idle time). Use
> netsaint_statd plugin to return to netsaint server what your script
Thanks for the suggestion. However I still need to have a separate
running vmstat as it's results are wildly inaccurate if run as "vmstat",
need to run "vmstat 2" to get reliable results (and the first line won't
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
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
daemon process is the only real option).
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux
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