Click here for important information about

Shell Scripting-Kill

Windriver Free bsd v4.4 unix
July 9, 2010 at 05:05:03
Specs: AIX, 512

I am using Shell Scripting in my Project. I want to Kill the Hung Processes which are there in the system for more than 24 hours.

Can someone help me with a command?.

I found Coulmn 6(if we give ps-ef) is updated with the date/number of days.. So i have used awk to check that 6 coulmn greater than 0. If then i will kill that process.

However its not working since i have some active processing updating the column six as pts/<Number> and these processes are also getting killed.

See More: Shell Scripting-Kill

July 9, 2010 at 05:07:19
Below is the command i am using now..

kill -9 `ps -ef | awk '$6 > 0 && /rims/ {print $2}'`

Report •
Related Solutions

Ask Question