- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Terminating multiple processes query
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 02:29 AM
04-12-2006 02:29 AM
Server running HPUX 11.00:
User: bh has logged off but has left about 100 processes running (ps -ef | grep bh). I have tried killing these off from the bottom up, to no avail (kill & kill -9). They seem to be respawned under a new pid each time.
When I run the 'top' command I usually receive several of these 'bh' processes within the top ten. They are not always the same ones though.
Rebooting is a last resort in this case. Any suggestions on locating the origin of this problem?
Much appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 02:36 AM
04-12-2006 02:36 AM
Re: Terminating multiple processes query
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 02:37 AM
04-12-2006 02:37 AM
Re: Terminating multiple processes query
kill -15
Try that.
else do a ps -ef |awk '{print $2} >/tmp/pids
for i in $(cat /tmp/pids)
do
kill -9/15 $i
done
Chan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 02:37 AM
04-12-2006 02:37 AM
Re: Terminating multiple processes query
ps -l -u bh
Try killing the PPID before the PID if it is not 1
Otherwise post the ps output
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 02:37 AM
04-12-2006 02:37 AM
Re: Terminating multiple processes query
If so, kill it & it may take all it's children with it.
Just don't kill PID #1
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 03:15 AM
04-12-2006 03:15 AM
Re: Terminating multiple processes query
It seems there are more than one or two parent processes. When I try to locate & kill them, I seem to get nowhere.
Please see the attached list using:
'ps -l -u bh'
Cheers.
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 03:38 AM
04-12-2006 03:38 AM
Re: Terminating multiple processes query
it looks like someone wrote a script containing
a line
*
or something like that which matches itself and breaks your system.
I would temp. move 'bash' to a different place,
try to kill the remaining processes and have a serious discussion with this user.
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 04:11 AM
04-12-2006 04:11 AM
Re: Terminating multiple processes query
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 04:24 AM
04-12-2006 04:24 AM
Re: Terminating multiple processes query
Do a:
UNIX95= ps -ej | pg
and note the PGID value for these runaway shells. Again, hopefully these bad boys share a common PGID (2nd column) or these processes use a small set of common PGID's:
What you want to do is send a signal (via kill) to this process group. This is done
by rather than sending kill -PGID to the process group.
For example if we want to send signal 11 (SIGSEGV) to add the members of PGID 3005 then "kill -11 -3005" would do that. Note that kill -11 is almost as deadly as kill -9 but does cleanup. Kill -ll is my "next to weapon of last resort".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 04:26 AM
04-12-2006 04:26 AM
Re: Terminating multiple processes query
I would definitly try this more than once and with different signals:
kill `UNIX95=1 ps -u bh -C bash -o pid=`
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 07:00 AM
04-12-2006 07:00 AM
Solutionexport UNIX95=1 ; ps -u rbadmin -o pid= | xargs -n1 kill -9
This will get all the pids for a user and feed it to "xargs" who will execute a kill -9 on each of them.
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 09:39 PM
04-12-2006 09:39 PM
Re: Terminating multiple processes query
Is there any other way to see the PGID column?
Also, Rodney: I am confused by the rbadmin part of the command you wrote. What part of the command do I need to add the user details 'bh' to?
Many thanks.
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 09:45 PM
04-12-2006 09:45 PM
Re: Terminating multiple processes query
did you really call the 'ps' with UNIX95-environment set? If not, the option(s) will not be recognized as valid.
Call the ps-command(s) (without the 'kill'-part) exactly as noted!
Another try: remove the execute-flag from 'bash'.
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 10:21 PM
04-12-2006 10:21 PM
Re: Terminating multiple processes query
I used the command:
export UNIX95=1
ps -u bh -o pid= | xargs -n1 kill -9
Killed all the required processes. Tried a kill & kill -11 first with no success.
Cheers.