Sponsored Content
Operating Systems Solaris Finding PID of Killing process Post 302347885 by jp2542a on Wednesday 26th of August 2009 08:22:17 PM
Old 08-26-2009
You can't. The kernel does not retain who sent the signal.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

killing PID's of ptree

gurus, normally to stop a process ,i need to kill all its child & then parent process. i do it manually as follows bash-2.03$ ps -ef | grep bpm|grep -v grep tibadmin 21882 21875 0 May 27 ? 0:00 /bin/sh ./bpmse_20.sh -Xms512m -Xmx512m /tibco/UpdateCustomer/dat/UpdateCustome ... (0 Replies)
Discussion started by: abhijeetkul
0 Replies

2. UNIX for Advanced & Expert Users

killing a process pid

What option is used with kill to cause the server to reread its config file. (16 Replies)
Discussion started by: jo calamine
16 Replies

3. Shell Programming and Scripting

Killing of a process and send a mail if the process doesnot come up within 2 minutes

Hi Friends, I am new to this forum as well as new to shell scripting. I have a problem here and i need someone to solve this. Let us consider there are two processes(abc & def).There is a script which kills these two processes(i.e killtheprocess abc). Here abc is the argument . There is a... (1 Reply)
Discussion started by: Prince89
1 Replies

4. UNIX for Dummies Questions & Answers

killing the process

Hi, First, I am running a scipt.While the script is running I realize that I dont want the script to be run so I am killing the script externally.Before the process gets terminated or killed it should delete all the temporary files created by the script.How to do this?Can anyone help me? ... (3 Replies)
Discussion started by: arthi
3 Replies

5. UNIX for Dummies Questions & Answers

Need to get pid of a process and have to store the pid in a variable

Hi, I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this. Thanks in advance, Amudha (7 Replies)
Discussion started by: samudha
7 Replies

6. Shell Programming and Scripting

Finding PID of a process using variable substituition

Hi All, Am copying mulitple files in a directory in names File0,File1,File2 etc. I need to print separately the PID of these copies using File names. for((i=0;i<5;i++)) do mypid=`ps aux | awk '/File$i/ && !/awk/ { print $2 }'` echo PID is $mypid done It printed nothing. Thinking... (6 Replies)
Discussion started by: amio
6 Replies

7. Shell Programming and Scripting

Finding the age of a unix process, killing old processes, killing zombie processes

I had issues with processes locking up. This script checks for processes and kills them if they are older than a certain time. Its uses some functions you'll need to define or remove, like slog() which I use for logging, and is_running() which checks if this script is already running so you can... (0 Replies)
Discussion started by: sukerman
0 Replies

8. Shell Programming and Scripting

Need help for finding and killing sql process

hi, iam completely new to scripting. this may sound naive but i have spend lot of time figuring this out. i want to make a script to find number of sql processes running. If the number of processes are more then 200, then pick out process IDs along with query it is executing, which are running... (0 Replies)
Discussion started by: Prateek Suhag
0 Replies

9. UNIX for Dummies Questions & Answers

Need script for killing Pid in Linux

need script(shell or python) for killing pid in linux (2 Replies)
Discussion started by: roshan9995
2 Replies

10. Shell Programming and Scripting

Trap killing PID

Hi, Just wonder if there is a way to identify the PID of the killing process using trap. Please let me know possible solution. #!/bin/ksh hello () { print "in hello"; print "PID of process issued SIGNAL"; --> this is what i'm looking for. } trap hello SIGKILL SIGTERM while... (3 Replies)
Discussion started by: Gajendra_PH
3 Replies
KILL(1) 							   User Commands							   KILL(1)

NAME
kill - terminate a process SYNOPSIS
kill [-s signal|-p] [-q sigval] [-a] [--] pid... kill -l [signal] DESCRIPTION
The command kill sends the specified signal to the specified process or process group. If no signal is specified, the TERM signal is sent. The TERM signal will kill processes which do not catch this signal. For other processes, it may be necessary to use the KILL (9) signal, since this signal cannot be caught. Most modern shells have a builtin kill function, with a usage rather similar to that of the command described here. The '-a' and '-p' options, and the possibility to specify processes by command name are a local extension. If sig is 0, then no signal is sent, but error checking is still performed. OPTIONS
pid... Specify the list of processes that kill should signal. Each pid can be one of five things: n where n is larger than 0. The process with pid n will be signaled. 0 All processes in the current process group are signaled. -1 All processes with pid larger than 1 will be signaled. -n where n is larger than 1. All processes in process group n are signaled. When an argument of the form '-n' is given, and it is meant to denote a process group, either the signal must be specified first, or the argument must be preceded by a '--' option, otherwise it will be taken as the signal to send. commandname All processes invoked using that name will be signaled. -s, --signal signal Specify the signal to send. The signal may be given as a signal name or number. -l, --list [signal] Print a list of signal names, or convert signal given as argument to a name. The signals are found in /usr/include/linux/signal.h -L, --table Similar to -l, but will print signal names and their corresponding numbers. -a, --all Do not restrict the commandname-to-pid conversion to processes with the same uid as the present process. -p, --pid Specify that kill should only print the process id (pid) of the named processes, and not send any signals. -q, --queue sigval Use sigqueue(2) rather than kill(2) and the sigval argument is used to specify an integer to be sent with the signal. If the receiving process has installed a handler for this signal using the SA_SIGINFO flag to sigaction(2), then it can obtain this data via the si_value field of the siginfo_t structure. NOTES
It is not possible to send a signal to explicitly selected thread in a multithreaded process by kill(2) syscall. If kill(2) is used to send a signal to a thread group, then kernel selects arbitrary member of the thread group that has not blocked the signal. For more details see clone(2) CLONE_THREAD description. The command kill(1) as well as syscall kill(2) accepts TID (thread ID, see gettid(2)) as argument. In this case the kill behavior is not changed and the signal is also delivered to the thread group rather than to the specified thread. SEE ALSO
bash(1), tcsh(1), kill(2), sigvec(2), signal(7) AUTHOR
Taken from BSD 4.4. The ability to translate process names to process ids was added by Salvatore Valente <svalente@mit.edu>. AVAILABILITY
The kill command is part of the util-linux package and is available from Linux Kernel Archive <ftp://ftp.kernel.org/pub/linux/utils/util- linux/>. util-linux March 2013 KILL(1)
All times are GMT -4. The time now is 02:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy