load average and some built-in monitoring mechanism

Ivan Voras ivoras at freebsd.org
Tue Mar 3 07:34:15 PST 2009


Zbigniew Szalbot wrote:
> Hi there,
> 
> My machine has recently been taken down by (most likely) runaway java
> process. The box had to be rebooted as there was no remote access to
> it but I am not able to find anything useful in logs to confirm
> whether it was java. Is there a tool that would enable me to
> automatically turn on verbose logging of top processes to some file
> once the load average is greater than the specified value? This way,
> once the storm is over, I would be able to see which process(es) went
> nuts.
> 
> I guess a tool like that may simply already exist in which case I'd
> appreciate links/more information. How are you dealing with such
> issues when/if they happen to you?

I don't think something like that already exists in base. You can use
"top -d1" to get a snapshot from top and a small shell script (or a
script in your chosen language) to test if the load average (you can get
it from sysctl vm.loadavg) gets unreasonable.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20090303/59688b3e/signature.pgp


More information about the freebsd-questions mailing list