[cod] script cpu load
Einar S. Idsø
einar.cod at norsk-esport.no
Mon Apr 5 11:30:55 EDT 2010
If you are looking at monitoring specific processes, and not just
looking for /any/ process which exceeds some resource limitations,
then I highly recommend Monit (http://mmonit.com/monit/) which is very
easy to configure and incredibly flexible. Example config for Apache:
check process apache with pidfile /usr/local/apache/logs/httpd.pid
start program = "/etc/init.d/httpd start" with timeout 60 seconds
stop program = "/etc/init.d/httpd stop"
if cpu > 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then restart
if totalmem > 200.0 MB for 5 cycles then restart
if children > 250 then restart
if loadavg(5min) greater than 10 for 8 cycles then stop
if failed host www.tildeslash.com port 80 protocol http
and request "/monit/doc/next.php"
then restart
if failed port 443 type tcpssl protocol http
with timeout 15 seconds
then restart
if 3 restarts within 5 cycles then timeout
depends on apache_bin
group server
Cheers,
Einar
On Mon, Apr 5, 2010 at 4:20 PM, pet <games at maxrate.pl> wrote:
> Hi
>
> Has anyone of You script which monitor the cpu usage of the users
> processes, and if find one which reaches 100% during 5 sec it will kill it?
> Any help would be great.
> _______________________________________________
> cod mailing list
> cod at icculus.org
> http://icculus.org/mailman/listinfo/cod
>
More information about the cod
mailing list