Solved

kill sessions/processes

Posted on 2004-08-26
3
323 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
List out all word 7 224
sumHeights  challenge 17 61
noX challenge 17 77
Annoying "thing" blocks my view 4 53
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now