[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

kill sessions/processes

Posted on 2004-08-26
3
Medium Priority
?
340 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 23

Accepted Solution

by:
brettmjohnson earned 200 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 21

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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

656 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