coight
02-28-2002, 07:10 AM
We are trialing a new system inhouse currently and I was personally wondering if it would be possible to run a cron, or command and if a certain process is using X% of the processor it will automatically terminate the process.
Is this possible?
ReliableServers
02-28-2002, 09:06 PM
Yeah there are few scripts out there to do just that I believe.
coight
02-28-2002, 09:27 PM
Originally posted by Dilhole
Yeah there are few scripts out there to do just that I believe.
For example :)
Hey,
Write a script to run 'ps aux', read the output line by line, at each line take the CPU usage, convert the string to a digit (float), compare it to a set maximum, if the number is larger, kill the pid from that line. It's fairly simple to do (even in C).
I'm also interested in any such script. Anyone knows how to get it?
dhlsg
03-01-2002, 07:10 AM
I know this isn't what you are after but it does explain some things :)
http://www.r-fx.net/lprl.php
Steve