04-04-2002
best way if you can do ps -aux im sure the process name that you are running. If you can try ps --username for the current process that you execute, by this way you have a idea on which process can be killed, rather then confused of all the systems process. One more suggestion ps -eo "%p" actually it will lists out the normal default output and easy for you to kill (works on AIX havent try on any other OS's) Give a try post back if this doesnt help..
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Problem
I have an application which basically runs lots of UNIX programs remotely, using the Telnet protocol. For each program it remotely executes, it stores the process ID (PID) for that process.
At regular intervals, I would like my application to take the PID for every process still... (5 Replies)
Discussion started by: 1cuervo
5 Replies
2. UNIX for Dummies Questions & Answers
Hi,
If in a shell script i write a command
ls > bla &
ls
The output is redirected to bla and the next ls starts as first one is going on in background.
I want to find the PID of the first command.
Thanks in advance (2 Replies)
Discussion started by: vibhor_agarwali
2 Replies
3. Shell Programming and Scripting
Hi Gurus,
How can i find background process is completed or not. I have mentioned my scenario below.
Actually Pr1 Process is running in back ground, i just want to know whether this process completed or not. I can come to know the process id by typing pid=$! but i want to trigger... (4 Replies)
Discussion started by: krk_555
4 Replies
4. Linux
Hello,
Iam running a apache webserver in CentOS recenlty a hacker has attacked my server using RFI attack and did something in my server.. After that everyday at 8Pm my httpd is using about 5000 pid's actually in normal it takes only about 30 - 40 pid's. and also exim uses 2000 pid's totally my... (2 Replies)
Discussion started by: dheeraj4uuu
2 Replies
5. Shell Programming and Scripting
Hi
Any idea how to get the process id of the process using the ports
lsof -i :portnumber does not work in my machine. I am on sun Solaris SPARC.
Any suggestion is highly appreciated (1 Reply)
Discussion started by: kinny
1 Replies
6. UNIX for Advanced & Expert Users
hi all,
I am trying to find the process id of the subsequent process created via fork and exec calls in perl.
For eg:
envVarSetter dataCruncher.exe < input.txt > output.txt
When I fork and exec the above command,
it returns only the pid of envVarSetter and I don't know how to find the... (9 Replies)
Discussion started by: matrixmadhan
9 Replies
7. UNIX for Dummies Questions & Answers
Afternoon all, hopefully someone can give me a hand with this (the following may be explained very poorly :rolleyes: )
I know there's a process running on one of our Solaris 10 boxes that runs approximately every 5 minutes. Unfortunately I've no idea, who owns it, what it is called, or how it is... (2 Replies)
Discussion started by: dlam
2 Replies
8. Shell Programming and Scripting
Hello,
The scenario is as follows, I have a background process running initially for which i know the PID on machine1. I use ssh from machine 2 to execute a script in machine 1. For some reason the back ground process is terminated. I would like to know which process caused the... (6 Replies)
Discussion started by: prasbala
6 Replies
9. Shell Programming and Scripting
Hi,
I am trying to find a file that have a different name than it should be processing, the file name is ( Fifa15 )
is there a command to use?
I got that file by
ps -ef | grep fifa15
but how do I know what is running ?
thanks a lot, I am learning unix so sorry if that is a... (2 Replies)
Discussion started by: latinooo
2 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)