Sponsored Content
Top Forums Shell Programming and Scripting Kill all processes belonging to one user Post 302345333 by narayanv on Wednesday 19th of August 2009 02:40:24 AM
Old 08-19-2009
Thanks a lot.

Regards,
Narayan
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

kill all processes

i have a very short file that has in it a line for a find command. now, when i run this script and I kill the script later, using the ps -ef | grep scriptname. i noticed kill -9 kills the script itself but does not kill the internal find command that it gave birth to. say theres a file... (0 Replies)
Discussion started by: Terrible
0 Replies

2. Solaris

how do I kill defunct processes?

mqm 17700 16815 0 0:00 <defunct> kill -9 does not work, even as root (10 Replies)
Discussion started by: csaunders
10 Replies

3. Solaris

kill processes

how to kill the processes of aperticular user? because i have nearly 25000 process are there for perticular user. i need to kill. Please provide the information? Regards, Rajesh (3 Replies)
Discussion started by: pmrajesh21
3 Replies

4. HP-UX

Read/kill processes

Hi, I read a set of processes with: ps -eaf|grep oracleTRLV The result is: oracle 23253 1 0 15:14:11 ? 0:00 oracleTRLV (LOCAL=NO) oracle 23301 1 0 15:15:07 ? 0:00 oracleTRLV (LOCAL=NO) oracle 22914 1 0 15:11:19 ? 0:00 oracleTRLV (LOCAL=NO) How to I kill the "oracleTRLV" ones? Is there... (17 Replies)
Discussion started by: NicoMan
17 Replies

5. Solaris

kill the processes seen under ptree

Hi, How to kill the processes running under ptree ? I am noticing lot of processes running under ptree with ssh ? I tried to kill with -9 option which is not working ? Thanks, Radhika. (2 Replies)
Discussion started by: radhirk
2 Replies

6. UNIX for Dummies Questions & Answers

Need help to kill parent and all of its sub processes

Hi, I am writing korn shell script. My requirement is, i have to kill the parent process and all of its child processes. Can some one please help me on this? Thanks in advance for your help.. (1 Reply)
Discussion started by: Sheethal
1 Replies

7. Shell Programming and Scripting

Kill processes

for i in 'ps -f | grep textedit' do kill $i done I wrote this but it wont work. I am trying to find processes and kill them. Any help would be welcome. (1 Reply)
Discussion started by: hawaiifiver
1 Replies

8. Shell Programming and Scripting

kill all user processes

Hi there, i've been searching all over and i thought i had understood the way i should go to kill all the processes related to a user. But i'm getting more confused then i was. By lunch time i have to make a database backup, and for that all the users shoul logout. The problem is that many users... (4 Replies)
Discussion started by: vascobrito
4 Replies

9. AIX

How to find out and kill all processes for a user?

Hi! We are using AIX 5.3. Can anyone please guide me to find out all the running processes for a specific user, say ' admin' and also kill them by force. Thanks! atech (9 Replies)
Discussion started by: atechcorp
9 Replies

10. UNIX for Advanced & Expert Users

Kill a list of processes

I am trying to kill a list of processes. I have found these two ways to list a group of process id's on a single line. How would I go about killing all of these processes all on one line? $ ps aux | grep 6243 | grep "a.out" | awk '{printf "%s ",$2}'ps aux | grep 6243 | grep "a.out" | awk... (8 Replies)
Discussion started by: cokedude
8 Replies
KILL(2) 							System Calls Manual							   KILL(2)

NAME
kill - send signal to a process SYNOPSIS
kill(pid, sig) int pid, sig; DESCRIPTION
Kill sends the signal sig to a process, specified by the process number pid. Sig may be one of the signals specified in sigvec(2), or it may be 0, in which case error checking is performed but no signal is actually sent. This can be used to check the validity of pid. The sending and receiving processes must have the same effective user ID, otherwise this call is restricted to the super-user. A single exception is the signal SIGCONT, which may always be sent to any descendant of the current process. If the process number is 0, the signal is sent to all processes in the sender's process group; this is a variant of killpg(2). If the process number is -1 and the user is the super-user, the signal is broadcast universally except to system processes and the process sending the signal. If the process number is -1 and the user is not the super-user, the signal is broadcast universally to all processes with the same uid as the user except the process sending the signal. No error is returned if any process could be signaled. For compatibility with System V, if the process number is negative but not -1, the signal is sent to all processes whose process group ID is equal to the absolute value of the process number. This is a variant of killpg(2). Processes may send signals to themselves. RETURN VALUE
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error. ERRORS
Kill will fail and no signal will be sent if any of the following occur: [EINVAL] Sig is not a valid signal number. [ESRCH] No process can be found corresponding to that specified by pid. [ESRCH] The process id was given as 0 but the sending process does not have a process group. [EPERM] The sending process is not the super-user and its effective user id does not match the effective user-id of the receiving process. When signaling a process group, this error was returned if any members of the group could not be signaled. SEE ALSO
getpid(2), getpgrp(2), killpg(2), sigvec(2) 4th Berkeley Distribution May 14, 1986 KILL(2)
All times are GMT -4. The time now is 11:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy