Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Script to kill processes
Name: brian.barnard Date: August 5, 2004 at 01:48:18 Pacific OS: Solaris 8 CPU/Ram: 256
Comment:
Hi,
I am trying to create a script that will kill a process. I have a file (proc.txt) which contains the process number but I don't seem to be able to tie the content of the file to the "kill -9" command to kill it.
Name: zarkod Date: August 5, 2004 at 02:18:58 Pacific
Reply:
Hi Brian,
a small
> cat proc.txt | xargs -l1 kill -9
should do it (and work with several PID lines too if any). But if this doesn't work you probably have unsufficient permissions to kill the process involved. Bye
0
Response Number 2
Name: brian.barnard Date: August 5, 2004 at 02:26:54 Pacific
Reply:
Thanks for that, got it working!!!
Brian
0
Response Number 3
Name: David Perry Date: August 5, 2004 at 04:54:10 Pacific
Summary: Hello, I need a small script to check which user and when is killing some processes in our database. This information shall be documented in a log file. Thanks in advance. Fouad ...
Summary: Hi, does anyone know how to write a script (prob using pgrep/pkill) to kill processes that making more than 5 copies of ITSELF ?? Thanks PS: this is quite urgent, please help. I got one reply yesterda...