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

learn more… | top users | synonyms

2
votes
2answers
84 views

gracefully terminating processes with killall <processname>

I am using several instances (profiles) of Icedove (Thunderbird) and when I need to close all of them, I use: killall icedove According to man killall, if no signal name is specified, SIGTERM is ...
1
vote
4answers
88 views

Killing a shell script running in background

I have written a shell script to monitor a directory using the inotifywait utility of inotifyt-tools. I want that script to run continuously in the background, but I also want to be able to stop it ...
1
vote
2answers
21 views

using sudo create another process

I have wrote a shell script names testShell.I run this shell using command: sudo sh testShell Then I use ps -ef|grep testShell|grep -v grep to check the processes created.I find that system ...
0
votes
3answers
29 views

kill several processes using awk tools

I want to stop several processes using awk.My command is like this: sudo ps -ef|grep wget |grep -v grep|awk '{print $2;sudo kill -STOP $2}' I want to stop all processes which is running wget. $2 of ...
1
vote
0answers
17 views

receive signal before process is being killed by OOM killer / cgroups

In our cluster, we are restricting our processes resources, e.g. memory (memory.limit_in_bytes). I think, in the end, this is also handled via the OOM killer in the Linux kernel (looks like it by ...
1
vote
2answers
27 views

Give group the right to send kill signals

I have a process that a user1 runs. And I need to grant all the group members the right to send some kill signal to it. So far, I always get this output: myProcess(13919): Operation not permitted ...
0
votes
0answers
17 views

Why are some processes “killable” by pkill but not killall?

I had over 20 instances of httpd (apache) processes running, so I decided to shutdown these. Normally I use killall, But when I typed killall httpd it just said: No matching processes belonging to ...
2
votes
1answer
24 views

SIGTERM not working occasionally

We use the regular /etc/init.d/jboss stop to stop the jboss on our machines. But at times, it does not stop the process and we get what is pasted below. When this happens we kill the process with a ...
31
votes
2answers
3k views

What does `kill -0` do?

I recently came across this in a shell script. if ! kill -0 $(cat /path/to/file.pid); then ... do something ... fi What does kill -0 ... do?
0
votes
1answer
18 views

Logging of what ended a process?

Due to the tight resources of the server, I suspect System will end processes from time to time. I want those events to be logged in a separate file for investigation. How do I set that in ...
0
votes
1answer
55 views

How does kill cascade in Linux? [duplicate]

Let us say I have process A which spawns process B, which spawns process C. Under what circumstances will killing A kill the whole chain (or tree I guess) and when will it not? I sometimes find it ...
7
votes
4answers
462 views

How to find source of spawning process?

I have a Java process running on a RedHat Linux instance. The problem is it keeps reappearing after I kill it. I am not sure where to look. I've already went to crontab, but no luck. I've looked at ...
1
vote
1answer
40 views

Why are --older-than and --younger-than killall options missing in RHEL/CentOS?

I've experienced this issue in cleaning up scripts written by developer who were writing for Ubuntu systems, as well as ServerFault questions like this. Is there any reason the -o, -y (--older-than ...
0
votes
1answer
27 views

Why process wasn't killed after closing SSH connection

I launched this command via SSH on a Debian server: watch --precise -n 1 top -b -n 1 -p 27330 | tail -n 1 | awk "{print \$9}" >> 27330.log & After a while I quit my terminal. When I ...
1
vote
1answer
118 views

What does the command pkill -USR1 -n -x dd mean exactly?

I am using dd to do a network transfer of a disk image to an sd card on my BeagleBone. Using pkill -USR1 -n -x dd in an ssh connection to this BeagleBone gives me a status update of the transfer ...
0
votes
1answer
70 views

Kill unresponsive process by name but preserve responsive processes

For some reason, I end up with a fair few Google Chrome Helper processes which stop responding, hogging CPU resources. Usually I just run killall Google\ Chrome\ Helper, however this kills all, ...
1
vote
1answer
22 views

A quit command weaker than windowkill?

Typing in xdotool getwindowfocus windowkill currently terminates the active window and bypasses any safeguards like "would you like to save your work?". Is there a weaker command than windowkill I ...
3
votes
2answers
169 views

Kill a process that keeps restarting

What if 'kill -9' does not work? or How to kill a script which starts new processes? doesn't help me in anyway. I have a python script which starts automatically with another process id using ...
17
votes
2answers
1k views

Why does `kill -l` not list signal numbers of 32 and 33?

Executing kill -l on linux gives: 1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP 6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1 11) SIGSEGV ...
4
votes
1answer
123 views

Immortal SSH Session

I've got a little TurnKey Linux Debian Squeeze VM that I use for SFTP. I had a user login and transfer a file the other day and now I can't seem to kill the session. I'm still a little shaky in ...
4
votes
1answer
50 views

kill unresponsive process

According to top, process named pccardd loads my CPU nearly 100%: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND ...
0
votes
2answers
39 views

Is killing processes created on startup safe?

I've just got a vserver running debian 7 and whenever I start the server and call the top command, there are very many processes that were started automatically on startup. Can I kill them or are ...
0
votes
2answers
198 views

How to kill a process running in specific script

I have two script files running simultaneously. I just need to kill the java process running in one script without affecting the java process in the another one.
2
votes
1answer
66 views

Killing multiple instances of the script from the script itself

I've couple instances of script.sh running in parallel, doing the same thing, running in background. I'm trying to use a function to kill all the current running scripts when executed. So, for ...
1
vote
2answers
133 views

kill xterm process in a bash

I would like to kill the xterm process I started this way in a script: #!/bin/bash echo "#!/bin/bash" > /tmp/test0 grep file | awk '{print "xterm -hold -e echo",$1,"sleep 10" && pid=$!}' ...
3
votes
1answer
510 views

Why is 'kill -9' killing browser as well as server?

I sometimes have to use kill -9 as a last resort to kill my rails server. Unfortunately, I have to do that often enough that I wrote a helper function in my bash_profile to do it. If I do it manually ...
3
votes
1answer
159 views

Ctrl+Alt+Backspace to kill X server can't be disabled

I would like to disable the Ctrl+Alt+Backspace shortcut to kill my X server. I have tried disabling it in the gnome-keyboard-properties "Layout Options..." dialog. When I start the dialog, the option ...
2
votes
1answer
72 views

I don't know how to cancel job

I'm a beginner about Linux in Korea and English is too. I'm circulating some simulation by using the Linux cluster but I have some problem in my job. I want to cancel any job(ID : 750, 752, 753 name ...
4
votes
0answers
37 views

Show error messages and information that a program was killed on another terminal [duplicate]

If I open a program, say evince, from the GNOME GUI, it is not attached to a terminal. If I send it a signal, it acts accordingly but nothing shows up in my terminal. If I were to open it in a ...
1
vote
1answer
109 views

How to kill - softly? [duplicate]

If I want to kill a process as careful and politely as possible, which signals should I use in a kill command, in which order? I would like to give the programm any kind of time to clean up, if it ...
3
votes
1answer
79 views

Triggering Bash Before Killed [closed]

I just made some kind of service code. Check this out: do_start() { while true do if [[ $(pgrep -fl loopsvn.sh | wc -l) -gt 2 ]]; then echo "Already use by another ...
5
votes
3answers
137 views

How to kill all open windows?

I want to close all windows appearing on my desktop. I've thought to do this through pkill, but I could only manage to kill them one at a time, which is not what I want. The end goal is to put this ...
2
votes
1answer
108 views

How to terminate a shell script?

I'm working on a supercomputer and have a shell script that will automatically schedule a bunch of jobs for me. Once the script is run, I can terminate manually with Ctrl+C. I was running the script ...
2
votes
0answers
84 views

kill or kick all clients from a running vncserver without restarting the server

I encounter quite often the problem, that I want to kick all connected clients from a running vncserver. Even better would be to be able to kick / kill even certain clients. With netstat -tupa | grep ...
3
votes
1answer
132 views

Process management and pkill

I've been studying process management using shell scripts and I'm starting to realise how difficult it is to make sure that it's done right. For example, you can record the PID of a program to a ...
2
votes
1answer
316 views

Kill any service running at a specific port

I am trying to write a script that kills service running at a specific port. This is my script: a=$(ps ax | grep 4990 | grep java | awk '{print $1}') kill -9 $a It's a java program. This script ...
2
votes
1answer
211 views

how to execute more than one command gnome-terminal

I have a script which is running some of (more than 15) applications like: cd mypath sleep 1 gnome-terminal -t App1 --tab -e "./App1" sleep 1 gnome-terminal -t App2 --tab -e "./App2" .. .. sleep ...
2
votes
0answers
35 views

In AwesomeWM, is the use of `c:kill()` as soft as clicking on the red cross in another window manager?

In AwesomeWM, windows are closed with the method c:kill() (bound to Meta-Shift-c) When I use that key binding, the window just close instantly! Therefore I wondered : Is that way as soft as ...
1
vote
1answer
30 views

killall <processname> throughout the system [closed]

I'm opening two terminal windows. Terminal 1 - I run process1 Terminal 2 - I run process2 I then terminate both process using Ctrl+Z in each window. I type killall -9 process1 in Terminal 2 , ...
3
votes
1answer
71 views

Interrupting very long output in tmux

In a (gnome) terminal, if I cat a file which turns out to be much too long, I can always press Ctrl-c to interrupt. However, in tmux, when the same happens, it takes long for the signal produced by ...
2
votes
2answers
530 views

Killing subprocesses after the script has finished or is killed

Say I have a script like the following #!/usr/bin/env zsh ./subscript.sh & # do stuff ... # do more stuff I would like the process running subscript.sh (and any processes initiated by it) to be ...
2
votes
1answer
49 views

Guard against killing an already killed process

I'm writing a script that tries to kill a process. But the process might already been killed by others. How can I guard against it and prevent this kill command from terminating my process with ...
26
votes
2answers
3k views

Will Linux start killing my processes without asking me if memory gets short?

I was running a shell script with commands to run several memory-intensive programs (2-5 GB) back-to-back. When I went back to check on the progress of my script I was surprised to discover that some ...
2
votes
1answer
739 views

kill pid is not working? [duplicate]

This is pretty weird now. I am trying to kill a process by using its pid but it is not working at all. root@machineA:/home/david# ps aux | grep modelling david 5075 0.0 0.0 1285420 29404 ? ...
1
vote
2answers
106 views

Temporarily freeze a process upon shell interaction

Let's say on a single console I have tail -F running, showing the output of many log files in realtime. Sometimes I need to run commands there too, however, and examine their output briefly, without ...
1
vote
1answer
272 views

nodejs sub processes in nohup bash script lock up

I run scripts with nohup that contain a list of a few hundred to a few thousand nodejs commands. These nodejs sub processes sync data from mysql and salesforce to couchdb. $ nohup ...
1
vote
1answer
78 views

getting pid of two last commands executed in background and do stuff

I wrote this bash: #!/bin/bash eval "(a command) &" pid1=$! eval "(while kill -0 $pid1; do .... ; done) &" #It creates file.txt after few seconds pid2=$! if [ -s ...
3
votes
5answers
931 views

Run a process to particular/dedicated pid only

I have a c program executable or shell script which I want to run very often. If I want to stop/pause or to notify something I will send signal to that process. So every time I have to check the pid ...
3
votes
5answers
1k views

Getting pid of bash script from itself

I have a bash script with doing lot of things called script.sh: #!/bin/bash #It #Is #Doing #Things Is there a way that I be able to get the proccess of script and then kill it after 5 minutes? ...
2
votes
2answers
252 views

Killing background process in bash script when exiting the script

I have a script that tail a file while displaying a clock in the top right corner. I took the clock part from the internet, and it works ok. The entire script is something like (I simplified): while ...