Killing multiple processes

Killing multiple processes

Post by b.. » Fri, 06 Oct 1995 04:00:00



I have been trying to figure out how to kill multiple processes that may or
may not be running on our server.  Basically, what I have is one HP-UX v9.05
machine acting as a gateway to a HP3k.  I need to make sure that all of the
vt3k processes are killed before MRP starts processing.  This is just a
safegaurd in case someone forgets to logout before they go home, and I forget
to check before I leave.
 
 
 

Killing multiple processes

Post by Peter Smulde » Sat, 07 Oct 1995 04:00:00



> ftp anonymously to clark.net directory pub/TMC/SUPPORT/HP-UX
> there is a subdirectory called HP..something scripts and get
> Kill   (upper case K)
> you can then use it as Kill PID PID PID and put as many as you like, plus
> it will provide 'graceful' killing

I use the following one-line script to kill all processes with
the name specified as argument $1 :

ps -e | grep $1 | tr -s " " " " | cut -f 2 -d " " | xargs kill
--
Peter

 
 
 

1. Dead Process Can't Kill

I am trying to figure out how to kill dead processess on my HPUX 11.0
system.  When I run who -u, I get a list of sessions that no longer exist on
the system.  When I run ps -ef |grep  [PPID], I don't see nothing running.
I don't where is picking up the LINE assignment.  Any tips would be
appreciated.

 $who -T -H  |pg
 NAME       LINE                     TIME          IDLE    PID  COMMENTS
 ccuser   - pts/ta                   Jun 25 09:15  6:07      11058
172.18.113.101
 *x87865   + ttyr1                Mar 14 13:24  0:10      26665
172.18.113.154
* x87865   + pty/ttyuc            Mar 14 14:04  0:01    24641
172.18.113.154
 ccuser   - pts/th                   Jun 25 11:20  4:08      2478
10.90.113.83
 x87865   - ny01p__26854     Jun 25 11:01   .       14719  172.18.113.154
* x87865   - 4e006__27027     Apr 19 13:09   .      4686    172.18.113.161
* x87865   - its13p__2820     Jun 25 11:44   .         4149
172.18.113.154
* x87865   + ttyr3                    Jun  5 09:36  0:07     21738
172.18.113.154
 *x87865   - 4w009__12776   Jun  5 14:24   .          13742  172.18.113.154
 *x87865   - pty/ttyye              Jun  5 14:32  old         5737
172.18.113.154

Jorge

2. ** Q: Norton Guide Compiler ?

3. can't kill process

4. Sendmail 5.64 IDA 1.3.4 / DEC mail11v3 problem

5. Killing a process with my /sbin/init.d/xxx

6. FS: Indy Cam

7. Kill a process by name

8. restoring contacts from Rom?

9. How to kill processes

10. Can't kill processes

11. kill on a process

12. Killing someone else his process

13. HowTo? Kill an Orphaned tty process