Click to See Complete Forum and Search --> : Process checking and killing


Dave2001
01-17-2003, 01:56 PM
Guys ,



On my work i have done some scripting already - but i dont seem to be able to figure this one out .

I want a script to check if there are any processes going "wild" . We have pretty regular problems that on some servers the 2 or more programs dont close well and then keep running at about 30% - 100 % .
So i want this script to check wherever there are these processes , list them and give me the opportunity to kill them .

So what i have done till now is looking into using ps - but somehow i dont get any further .

ps -eo "%c" | sort -gr

sorts all the processes but doesnt really show all - and then i dont really know how to put only the 2 or 3 processes with lets say over 30% CPU time into the output and let the user choose ...

Thanx already for reading all this and your help !