[HPADM] Re: Kill process

From: MuthuKumar (kmuthukumar@lycos.co.uk)
Date: Fri Oct 22 2004 - 01:53:35 EDT


> How do you kill all process running from one username. I have 276 process running from one user "siteman" and I want to kill them
> all.

We can do this simply by killing ALL siteman user's shell PID from root.
You can get those shell PID as,

who -Ru | awk '/^siteman/ { print $7 }'

Note: Check with above one. are you getting PID's there. Else change $<number> there in awk. I don't have machine to check.

collect PID from who -Ru siteman
kill -9 `who -Ru siteman | awk '/^siteman/ { print $7 }'`

Regards
Muthukumar.

---
===============  It is a "Virus Free Mail" ===============
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.779 / Virus Database: 526 - Release Date: 10/19/2004
--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:44 EDT