Questions tagged [kill]

125 questions
27
votes
3 answers

kill -9 a postgres process

A postgres SELECT query ran out of control on our DB server and started eating up tons of memory and swap until the server ran out of memory. I found the particular process via ps aux | grep postgres and ran kill -9 pid. This killed the process…
Banjer
  • 3,854
  • 11
  • 40
  • 47
24
votes
7 answers

How to kill a process with parent 1

I am running Bacula on a RedHat box. From time to time, the storage daemon bacula-sd stops working and becomes . [root@backup ~]# ps -ef | grep defunct | more root 4801 29261 0 09:25 pts/5 00:00:00 grep defunct root 5825 1…
andreas-h
  • 1,054
  • 1
  • 16
  • 27
24
votes
6 answers

Kill a process and force it to return 0 in Linux?

In the Linux environment, how can I send a kill signal to a process, while making sure that the exit code returned from that process is 0? Would I have to do some fancy GDB magic for this, or is there a fancy kill signal I'm unaware of? Test…
sega01
  • 341
  • 1
  • 2
  • 3
23
votes
3 answers

Kill process with high CPU usage after X time?

Running Linux I have a few processes which tend to crash occasionally (game servers), which end up using 100% cpu. I'm looking for a program or script to check the cpu usage of a list of processes by name and if they are at 100% for more than X…
user30153
  • 231
  • 1
  • 2
  • 3
22
votes
6 answers

kill a screen (but not all screens)

I have multiple screens running on an Ubuntu server that are initiated as: screen -dmS screen1 cmd screen -dmS screen2 cmd etc... And I need to kill one screen, but not all of them. What is the correct command to kill a single particular screen…
BassKozz
  • 645
  • 2
  • 8
  • 15
21
votes
4 answers

How do you kill a process tree in linux?

Sometimes, sending a SIGTERM to a process will cause it to send SIGTERM to all its child processes. However, sometimes this doesn't work. Is there a command or a utility that will allow me to kill a process and all its child processes at the same…
itsadok
  • 1,839
  • 5
  • 21
  • 33
16
votes
16 answers

How do I kill processes older than "t"?

First, yes I have seen this question: Find (and kill) old processes The answers there are incorrect and do not work. I have voted and commented accordingly. The processes I want to kill look like this when listed with ps aux | grep page.py: apache …
hobodave
  • 2,800
  • 2
  • 23
  • 33
14
votes
3 answers

How does Windows kill a process, exactly?

I'm unfamiliar with how processes are killed in Windows. In Linux, a "warm" kill sends a signal (15) which the process can handle by instantiating a signal handler. A cold kill is signal (9) which the OS handles by killing the process forcefully.…
IttayD
  • 1,037
  • 4
  • 11
  • 14
14
votes
4 answers

What *exactly* gets screwed when I kill -9 or pull the power?

Set-Up I've been a programmer for quite some time now but I'm still a bit fuzzy on deep, internal stuff. Now. I am well aware that it's not a good idea to either: kill -9 a process (bad) spontaneously pull the power plug on a running computer or…
Mike
  • 425
  • 1
  • 4
  • 11
13
votes
2 answers

linux: kill all my processes but not this terminal

I want an easy way in linux to kill all my current processes. The problem with kill -9 -1 is that it also kills the current terminal. Is there an easy way to kill everything except the current terminal?
flybywire
  • 587
  • 4
  • 9
  • 20
12
votes
1 answer

Killing systemd service with and without systemctl

What is the difference between killing an running daemon systemd service like this : kill -SIGKILL 3645 and systemctl -s kill -SIGKILL 3645 where 3645 is the pid of the systemd service.Also are there any drawbacks of using the first method?
Gordon
  • 141
  • 1
  • 1
  • 4
11
votes
7 answers

Find (and kill) old processes

Basically I need to be able scan the process tree and find processes that match a certain name and started running more than a week a go. Once I have them, I need to kill them. All the processes are still seen as in a running state by the system,…
Ryaner
  • 3,027
  • 5
  • 24
  • 32
11
votes
3 answers

What effect does it have on a server when you kill all root processes?

There were other devs logged in as root that I wanted to kick out. So I issued pkill -KILL -u root Then I realized that I probably killed all kinds of root processes. Have I damaged my system? I can't reach it through SSH now. UPDATE: Web server is…
Buttle Butkus
  • 1,719
  • 8
  • 32
  • 45
10
votes
4 answers

UNIX permissions to allow group users to kill each others' processes

Let's say we have a group (dev) which has many users and a shared development directory with g+rwx permissions on all contained files. Is this setup sufficient so that any dev user can kill a process launched by any other dev user (assuming the…
maerics
  • 203
  • 1
  • 2
  • 7
9
votes
1 answer

cannot remove file, Device or resource busy

I tried removing a file. The most relevant answer can be found here, but I found no luck. Here is the original problem: maxgitt@mgpc:~$ sudo rm -rf /var/lib/docker/ rm: cannot remove '/var/lib/docker/aufs': Device or resource busy To locate the…
Max
  • 227
  • 2
  • 4
  • 7
1
2 3
8 9