We are faced with an an application that occasionally decides that it wants
to be greedy and eat the entire CPU under FreeBSD 4.7. This is a known issue
with the program, and we hope to get a fix soon. A quick fix for now though
is to just restart the process, which we are happy to do. Now I'd like to
automate this process. I can write a script or program to do this whenever
the process consumes 99% or more of the CPU, but I'm curious if there is
something ready-made for this already? Basically, I'd like to say that if
process X is eating more than Y% of the CPU then restart the process using
some arbitrary method (i.e., run a user-defined script).

Yes, I can do this via a script. I'm curious if there isn't something a
little more generic already written to do this. Also, I will want to run
this program as a daemon. The startup cost when the CPU is tagged is going
to mean a new program (the monitor) would startup very slowly.

---
Dustin Puryear
http://www.puryear-it.com

Reply via email to