Solved

kill sessions/processes

Posted on 2004-08-26
3
330 Views
Last Modified: 2013-12-26
hi.  i have a nightly job that runs and spawns several unix processes.  each process has the same user as the owner.  during development, sometimes i get many sessions hung at one time.  then i have to go through and kill them all one by one by saying kill <pid>.  is there a way that i can issue a kill command that will kill all sessions owned by the userid that i'm currently logged in as?  this is hp-ux. thanks.

bp
0
Comment
Question by:indypung
3 Comments
 
LVL 23

Accepted Solution

by:
brettmjohnson earned 50 total points
ID: 11908421
A PID of -1 means kill all processes owned by the current user:

  kill -KILL -1

To kill all processes owned by another user requires super-user capabilities
(to su to that user):

  echo kill -KILL -1 | su -m <user>

0
 
LVL 20

Expert Comment

by:tfewster
ID: 11908481
Under HP-UX, it would be:
su - <user> -c kill -1
0
 
LVL 11

Expert Comment

by:avizit
ID: 11909388
does HP-UX  have  the 'pidof' command ?

if so you can also use

kill `pidof progname`  

as in if you want to kill the  opera browser  

kill `pidof opera`

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
windows 10 how make picture as desktop background 2 65
ShiftLeft challenge 21 86
Change to event 1 119
Capture logon name 13 88
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question