kill - Send a specified signal to a process or process group.

learn more… | top users | synonyms

4
votes
1answer
503 views

What is the difference between exiting a process via Ctrl+C vs issuing a kill -9 command?

I know I can kill any process with kill -9 command . But sometimes i see that even if I have terminated a program with CTRL+C , the process doesn't get killed . So I want to know the difference ...
3
votes
1answer
1k views

Cannot kill a java process

I have a java process that cannot be killed. I have tried every method I know, or that I have found on the internet to no avail. I have tried: killall java kill -9 <pid> kill -11 <pid> ...
2
votes
1answer
131 views

Refreshing less on the fly

I'm writing a script in which I pass the output of a function to less, wait for some time, and then kill less. All of this done inside a loop. This makes it look like less is updated on the fly. ...
1
vote
1answer
177 views

Application in terminal still running but not directly accessible [duplicate]

Possible Duplicate: How to suspend and bring a background process to foreground I have kind of an odd problem which I haven't encountered before. Here's what I did: I started an ...
6
votes
1answer
578 views

`kill -s TERM` works, `kill -s ABRT` gets “Operation not permitted”

There is a process that I own whose documentation claims I can send SIGABRT to in order to get some debugging information. However, when I try to send SIGABRT, I get back "Operation not permitted". I ...
5
votes
4answers
348 views

Accidental `nano SomeFile | uniq` renders the shell unresponsive

In my attempt to get unique entries (read lines) out of a simple text file, I accidentally executed nano SomeTextFile | uniq. This "instruction" renders the shell (bash) completely (?) ...
2
votes
2answers
678 views

Why can't I kill a timeout called from a Bash script with a keystroke?

[Edit: This looks similar to some other questions asking how to kill all spawned processes – the answers all seem to be to use pkill. So the core of my question may be: Is there a way to propagate ...
1
vote
3answers
822 views

I want to kill all processes that result from the following command

The following command will display all the PID's running for vmstat1: ps -ef | grep "vmstat 1" | awk '{ print $2 }' My question is, how do I kill them all, if there's like 20 of them at once?
8
votes
4answers
4k views

How can I kill and wait for background processes to finish in a shell script when I Ctrl+C it?

I'm trying to set up a shell script so that it runs background processes, and when I Ctrlc the shell script, it kills the children, then exits. The best that I've managed to come up with is this. It ...
1
vote
2answers
324 views

How to stop a infinite running process (ztail) started by a ssh session after that session is closed

I have a peculiar problem. My server supports multiple ssh session simultaneously, so that multiple admins can manage (via command line interface) it simultaneously. We have a command which calls ...
6
votes
2answers
1k views

kill -9 hangs, unable to kill process (murder proof process) [duplicate]

Possible Duplicate: What if ‘kill -9’ does not work? I guess its a bit late to ask this, but for future reference; I was called to look at a server today after a customer was reporting ...
11
votes
3answers
733 views

How Can Terminal Emulators Kill Their Children After Recieving a SIGKILL?

From what I understand, SIGKILL cannot be caught. This would imply that a process does not have time to kill it's children before the OS destroys it. This can be demonstrated with a shell script. ...
1
vote
1answer
412 views

Korn shell timeout/kill script

I am trying to write a simple Korn shell script to execute a loading process. The process occasionally runs into connectivity issues, so I need to kill it if it runs too long. I have been trying the ...
4
votes
2answers
178 views

How to kill a process giving it a number of seconds before a doing the forced kill?

I do have the PID of the process to be killed but I do want to give it the chance to die peacefully, without doing a -9. Expected behaviour: check if PID is still running for up to ten seconds and do ...
8
votes
6answers
5k views

Kill many instances of a running process with one command

This is one of the questions that has troubled me often. Suppose I have thousand or more instances of any process(for e.g. say the process vi) running. How do I kill them all in one single shot/one ...
2
votes
2answers
737 views

`[java] <defunct>` with defunct children -> Any way to collect them?

Relating to question : What if 'kill -9' doesn't work? I have following situation : zombie process with threads, not collected by init : [root@Arch64]# ps auxH | grep java gwpl 569 ...
4
votes
2answers
626 views

Why is `sudo pkill -HUP -f “nginx: master process”` returning code 129 and no output

I'm trying to trigger a reload of the Nginx master process by using pkill and sudo. The server reloads fine, but I was just curious if anyone knows why the command sudo pkill -HUP -f "nginx: master ...
2
votes
3answers
9k views

How do I exit or cancel a bad bash command?

I expect to get some flak for this, but I can't find the answer anywhere. It seems like it should be so obvious. Sometimes, when I type a bad command in a bash terminal, the cursor just jumps down to ...
3
votes
2answers
2k views

Why would Ctrl-C behave differently than kill -2

I have a program which is supposed to handle SIGINT and gracefully shut down. When I run this program from a terminal without backgrounding it I can shut it down just fine using Ctrl-C. Inspecting the ...
11
votes
2answers
910 views

Is there an upper limit to the number of zombie processes you can have?

I used to work with an HP-UX system and the old admin told me there is an upper limit on the number of zombie processes you can have on the system, I believe 1024. Is this a hard fact ceiling? I ...
3
votes
1answer
519 views

Can't kill process, not in zombie or uninterruptable sleep [closed]

I can't figure out how to kill this process. I ran du, but it took too long so I tried to kill it. It didn't die. I've tried SIGKILL, SIGSTOP, SIGINT, etc, with no effect (can't kill it, can't stop ...
9
votes
4answers
3k views

How to make `xargs` ignore child's exit and keep processing further

I sometimes run long xargs jobs overnight and it is really annoying to discover in the morning that xargs died somewhere in the middle, for example because of a segmentation fault in one single ...
13
votes
3answers
3k views

How to kill a process with a single command?

I want to kill a process, after finding the id in a single step. I currently use these two commands: pidof <name> kill <#number_which_is_result_of_command> How can I write a single ...
1
vote
1answer
551 views

How to make the system automatically kill some processes?

Sometimes my computer starts to behave sluggishly after running too many programs/processes simultaneously, at points almost looking crashed/frozen. Using Debian Linux, is there a way to ...
3
votes
2answers
724 views

How can I kill the top CPU/IO process quickly?

I find that sometimes my Linux will stop responding, so I need to switch to another terminal with CtrlAltF2, and type a command to kill the top CPU usage process or top IO usage process, so that the ...
1
vote
2answers
1k views

Kill all processes related to an application

I have two processes that are temporarily spawned and I need to kill them. Here are the processes from ps aux david 38329 0.0 5.0 3916476 104624 s002 S 11:33AM 0:17.43 ...
3
votes
2answers
2k views

Exit Google Chrome from terminal

Is there a way to cause google-chrome to quit, from the terminal, besides using killall google-chrome? I would like to be able to close it from a script without killing it.
2
votes
1answer
635 views

how to get out from the command iostat on unix?

I was installing a .iso 8,2 version in a vmware to learn unix., and i am stuck with iostat command, i run iostat 3 and is keep going to show me the results, but whem i put exit or q or q! to exit, he ...
1
vote
1answer
182 views

Creating Cron Task to kill stalled/failed runs in a system

I was given a task to create a cron which finds, kills and clears old puppet runs that were not successfully installed. I am more or less looking for a starting point.
3
votes
5answers
2k views

Graceful way to kill process

After my bash script is done with the selenium server, the script kills it like this: kill `ps -ef | grep selenium | awk '{ print $2 }'` While this works and it does kill the selenium script, it ...
1
vote
1answer
533 views

Cross-platform (Linux, BSD, Solaris) way to check if pid exists

I am looking for a reliable cross-platform way to check if a process with a specific pid is running. Two possible solutions came up: kill -0 $PID — exit status is 0 if it the process exists and 1 ...
1
vote
1answer
305 views

How to create a cron which finds/kills/clears old puppet runs?

I am a new user of bash/cron, and I was given a task to create a cron which finds/kill/ and clears old puppet runs that were not successfully installed. The more help the better, but I am more or less ...
9
votes
3answers
2k views

Linux: Kill process based on arguments

How can I kill a process based on its command line arguments? killall, pgrep, and pkill seem to only work based on the process name. I need this to be able to differentiate between a number of ...
3
votes
3answers
866 views

Killing other user processes

There are certain user environments in which we have to login during certain performance testing and and kill all the process running in that environment. The environment names are like rswrk01, … up ...
21
votes
2answers
561 views

When you try to terminate a process for good, which option for “kill” should you use?

I am getting a lot of mixed messages from people, and was wondering if it there really is not much of a difference in what you use. kill 'x' killall 'x' kill -9 'x' These are some options I've been ...
2
votes
3answers
759 views

What is meant with terminating a process normally?

In an examination it is stated: Give 2 different ways that a process can terminate normally. Describe the differences. What is meant with terminate normally?
7
votes
3answers
9k views

How to kill a daemon with its name gracefully?

I usually kill a process with killall. killall markdoc But I can't sure this command terminates the process gracefully. Does this command graceful termination? If it's not, how can I kill a ...
13
votes
5answers
3k views

Any way to restart a Linux machine via SSH if the root filesystem is not working?

Just as a curiosity; something went wrong with a Linux machine, making the root file system show up as "64Z". A few commands work, like top, df, and kill, but others like reboot come up with "command ...
6
votes
4answers
3k views

Finding the ID of a process and killing it

When ever I need to kill a background process I do ps -e | grep <process_name> Which prints something like this 1766 ? 00:00:13 conky , Then I use the process ID to kill it like so kill 1766 . ...
2
votes
1answer
174 views

How long has GNU kill(1) accepted a name argument?

We recently discovered that GNU kill, going beyond spec, will take a name as its argument and try to kill all processes with that name, in the same vein as pkill(1) or some implementations of killall. ...
1
vote
0answers
179 views

Rogue Java process brings my computer to a halt

In reference to my earlier post: Is there a log of past threads that are now closed? I gave the process a kill -STOP signal and started examining the details. I can't seem to figure out why it is ...
2
votes
2answers
348 views

Is there a log of past threads that are now closed?

Sometimes, I have a rogue Java process which takes up 100% of my CPU and makes it jump about 30C in temperature (usually resulting in a crash if not killed). Problem is, I can never really identify ...
4
votes
2answers
5k views

How to pkill by “command name”?

So I'm executing a command like: COMMANDNAME -PARAMETERS But..why can't I kill it with "pkill"? I'm trying with: pkill -9 "COMMANDNAME -PARAMETERS" but it doesn't kills the "COMMANDNAME ...
7
votes
3answers
1k views

How to stop a bunch of processes on unix fast?

How to stop a bunch of processes on unix fast. I can use ps/top, kill. If the number of processes is very large, I use shell script. Are there other ways, only one or two unix commands can do it ...
2
votes
1answer
864 views

Does a process invoking oom-killer kill itself?

Looking through syslog, I see lines like dd invoked oom-killer. Does this mean dd is being killed by the oom-killer or does it mean dd asked oom-killer to go kill another high memory process?
1
vote
2answers
1k views

Is it possible to kill another user's program? How?

root can kill any program run by any user. Is it possible for a user to kill another user's program without using sudo, etc.? Example: How can make user foo kill program x which is run by user bar?
3
votes
2answers
943 views

Terminate Root Processes

Is there a way to terminate a root process without entering an administrator's password? You might be wondering why I'd want to do this 'cause it sounds fishy. Well I just need to end a process ...
7
votes
1answer
876 views

Interrupt sequence CTRL+C does not work for user

In any terminal operating under GNOME, if I press Ctrl+C, I only see a question mark. Same goes for Ctrl+Z. The output of stty -a | grep intr is: intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ...
3
votes
3answers
4k views

Killing multiple GNU screen sessions with the same name

Sometimes my script bugs out and multiple screen sessions with the same name get created. Is there a way to kill all of these with this name in one command? Rx:/scripts# screen -S haydoz-script -X ...
10
votes
5answers
3k views

How to soft kill gui applications via terminal?

Is there a way to close a GUI application in friendly "please quit yourself now" way, without graphical access to the applications window? For example, if Gnome/X display crashes to black, I'd like ...