Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [kill]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
37 views

How can I make bluetoothctl quit running?

I have been experimenting with bluetoothctl and blueman. I have closed the window of blueman. I have also typed quit in bluetoothctl's command line interface. I have also run systemctl stop bluetooth. ...
Tim's user avatar
  • 103k
0 votes
1 answer
33 views

Run a few identical process and then kill one of them

Problem: Need to run several process, especially it will be “tail -f log.log >> wrile_log.log” proces to collect log. Commands can be run at the different time for same log file. This is not ...
Alex Alex's user avatar
4 votes
1 answer
782 views

What is the correct way to unconditionally kill a process?

I have two hotkeys for interactively looking up and killing a process on Linux: bindsym $mod+k exec --no-startup-id \ "ps axo pid,cmd | sed 1d | dmenu -i -l 20 | awk '{print $1}' | xargs kill&...
Fadeway's user avatar
  • 153
-1 votes
3 answers
53 views

"The rest of the line" How setup ssh client console to show all (/px aux) java process line to know the name of the java file?

I have 3 java process running on my host - i access the host by a ssh client. Some one of that process freezed and i need kill that pid process to re-start it I know the name of the file, but i dont ...
Felipe Braga Comonier's user avatar
1 vote
0 answers
13 views

Script/Daemon to kill specific resource-consuming tools?

I'm working on a SGE linux cluster and beginners often run memory/resource consuming tools on the login node instead of using qsub or qlogin ( https://gridscheduler.sourceforge.net/htmlman/htmlman1/...
Pierre's user avatar
  • 1,793
0 votes
0 answers
43 views

Prevent OOM killer inside guest in LXC

I have a python program myprogram.py. I realized that my python program is being killed due to Out Of Memory (OOM). But, I noticed also that my VPS is inside LXC and has swap 1GB, when the memory full ...
Muhammad Ikhwan Perwira's user avatar
0 votes
1 answer
43 views

Operation referenced in sudoers still fails on kill command

I what to be able to restart ConnMan from within Node-RED. That service runs with its own user nodered. When I SSH into the device as the nodered user and type nodered@pi:~$ sudo /etc/init.d/connman ...
Norbert's user avatar
  • 121
0 votes
2 answers
76 views

How can I change the name an executable presents itself to the system

Forgot to mention, running on Suse Tumbleweed, Desktop is KDE Plasma. I have in my bin directory a symbolic link to mpv, $ ls -l bin/Play lrwxrwxrwx 1 boffi users 12 Feb 11 12:33 bin/Play -> /usr/...
gboffi's user avatar
  • 1,454
0 votes
0 answers
27 views

Zenity --auto-kill is not working on a ghostscript process

I'm with a problem with the --auto-kill zenity option, which function is, according to zenity --help-progress, used to kill parent process if Cancel button is pressed. That's what I need in this line: ...
samueldelorenzi's user avatar
0 votes
1 answer
26 views

When does a hup signal affect the parent process? [duplicate]

If I run ./script.sh &, where script is the following: #!/bin/bash echo "hello" sleep 30 echo "hello again" sleep 30 touch /root/foo.txt Then I use ps au, to identify the &...
Thomas Stokes's user avatar
1 vote
3 answers
168 views

start multiple terminal windows in a "process group" so that remaining processes can be killed, if any one of the processes terminates

I have a script which starts 3 terminal emulator windows: #!/bin/sh terminator --role='terminator-left' 2>/dev/null & sleep 0.1 terminator --role='terminator-center' 2>/dev/null & sleep ...
Martin Vegter's user avatar
0 votes
1 answer
45 views

How do I read Cygwin's `/bin/kill` man page without bash's `kill` builtin interfering?

I'm using Cygwin on Windows 10 but I also use Ubuntu with WSL2. I can't reproduce this with the latter. When I type man kill in cygwin, it says No manual entry for kill. When I type man /bin/kill, it ...
Daniel Kaplan's user avatar
0 votes
0 answers
120 views

How is the order of processes killed in cgroup v2 when out-of-memory?

I'm using cgroup v2 on Ubuntu 22.04 to limits users in a group. I'm wondering how the processes are killed when out-of-memory (OOM). For an instance: The computer has 100G memory. I have a group of 4 ...
hffqyd's user avatar
  • 1
4 votes
0 answers
47 views

Perl's `kill` is using `$! == Errno::EINTR` unexpectedly

I wrote a network daemon that forks off children to handle TCP connections. On SIGINT the main process triggers a kill for each child in order to clean up and to collect some final statistics. In ...
U. Windl's user avatar
  • 1,493
7 votes
0 answers
175 views

Why does `kill -0` return success on a non-existent process?

I'm on Ubuntu 22.04.3 LTS, (Jammy Jellyfish). $ ps -p 1635 PID TTY TIME CMD $ kill -0 1635 ; echo $? 0 $ type kill kill is a shell builtin $ echo $BASH_VERSION 5.1.16(1)-release $ mount|...
Philippe's user avatar
  • 1,475
0 votes
0 answers
32 views

linux: kill -9 process success only on second attempt

I'm currently solving umount /chrootedpath /dev/pts after several chroot(s): target is busy. I've found part of the problem - two processes still running ps had shown as sudo choot command. They were ...
Alex Martian's user avatar
  • 1,065
1 vote
1 answer
65 views

Background process is not being terminated by SIGINT when executed via ssh

I was experimenting with ssh, nohup, bg etc. I started a tail process in remote using $ ssh remotehost '{ nohup tail -f ut.log &> /dev/null < /dev/null &} && echo $!' It ...
Sourav Kannantha B's user avatar
2 votes
1 answer
421 views

I wish to kill a service with a "sytemctl kill logstash.service" but SIGTERM is received by the service, instead of a SIGKILL. How do I send SIGKILL?

A new logstash version I'm using can't stop, attempting to connect to Elastic all the time, while it can't (an authentication trouble, I will resolve later). a sudo systemctl stop logstash.service isn'...
Marc Le Bihan's user avatar
0 votes
0 answers
120 views

A process using CUDA gets stuck, then all others get stuck as well - what do I do?

I’m writing some program using CUDA CUDA 12.1, running on a Linux system (Devuan Daedalus, kernel version 6.1.27). For some reason (which may be a bug of mine, although I kind of doubt it) - the ...
einpoklum's user avatar
  • 9,662
2 votes
1 answer
290 views

Processes in uninterruptible sleep when the server is not responding

I'm using sshfs to mount and interact with directories and files located on a remote server. The command I'm using is: sshfs -o follow_symlinks host:dir mountpoint -o reconnect Sometimes, after a ...
TVG's user avatar
  • 143
-2 votes
1 answer
431 views

killed a process, it comes back

I have some process running >ps | grep camera 2345 root 3.08 someprocess camera.json I am trying to kill it but neither kill 2345 kill -9 2345 work. The process comes back to life under a ...
KansaiRobot's user avatar
22 votes
6 answers
3k views

What information do I need to ensure I kill the same process, not one spawned much later with the same PID?

I have a bunch of commands that I start with a start.sh script, storing their PID. Then later, I want to stop them with a stop.sh run at the user's convenience. Watch the trap: I run start.sh today, ...
Marc Le Bihan's user avatar
1 vote
0 answers
238 views

Using the fuser command to kill processes using a mount point is taking a long time

I am trying to kill processes with open file handles on a mount point before performing unmount. We observed for a few mount points, the below fuser command is taking a long time. It took more than 3 ...
Bharath's user avatar
  • 11
1 vote
1 answer
90 views

How to kill known running pids if one of the pids terminated?

I have this script.sh where I pass the path to the binaries, all apps run in the background: ./script.sh path/to/app_1 path/to/app_2 ... path/to/app_n Here is the script: #!/bin/bash for app in &...
a.wise's user avatar
  • 15
-2 votes
1 answer
1k views

Firefox freezes, can't be killed, and Debian 11 XFCE can't be shut down

Problem: (has been happening every day, at least once, but commonly many times) I have a Debian GNU/Linux 11 (bullseye) system where Firefox 102.9.0esr (64-bit) has been randomly freezing and needing ...
BsAxUbx5KoQDEpCAqSffwGy554PSah's user avatar
0 votes
0 answers
190 views

Gracefully quit "Install macOS Ventura.app" with Terminal

I have a script I would like to deploy to Mac endpoints which would quit the "Install macOS Ventura" installer app if it's open. I'm using the kill -9 <PID> command, and it doesn't ...
maconfire's user avatar
0 votes
0 answers
245 views

how to kill java process forcefully and remove directory which is used by that process

I have one use case where I am killing a java process with pkill java, and after that, I want to remove certain directories. I have used rm -rf /pathtofolder but it gives: rm: cannot remove '/...
Samurai's user avatar
  • 55
0 votes
1 answer
617 views

Systemd delaying restart of a failed service, appears to add a 30 sleep

(Originally posted this on stackoverflow but was asked to move it here.) I have a python daemon running as a service, sometimes several of them are running for different processes (p0, p1, etc.) that ...
Dave's user avatar
  • 113
0 votes
2 answers
541 views

Can't Ctrl-C a script after controlling it from another terminal

I'm running blah.sh in one terminal. Then in another terminal, I'm running a script that suspends and later continues blah.sh: ... script_id=`pidof -x blah.sh` kill -s SIGSTOP $script_id ... ...
Adam M's user avatar
  • 1
1 vote
0 answers
1k views

Python process has 100% CPU usage and can't be stopped

I have a python process running on a CentOS machine. I the process is running with 100% CPU usage and status 'R'. I tried to kill it with kill -9 PID but it didn't work. How can I kill the process?
Hadar Shavit's user avatar
1 vote
2 answers
250 views

Kill all processes macthing a pattern, ignoring case

I want to have an alias to do something like pkill -f PATTERN but ignoring the case of the pattern. This is what I have after looking around but it's not working alias pkf="kill `ps ax | grep -i $...
user avatar
1 vote
0 answers
1k views

How can I kill a process in Linux when kill -9 fails?

I have a process (actually a pair of them) numbered 1234 which uses my NVIDIA GPUs. I want to kill it. I tried kill 1234; I tried kill -9 1234 I tried kill -KILL 1234 - no effect. Tried Ctrl+C and ...
einpoklum's user avatar
  • 9,662
1 vote
0 answers
566 views

How long can kill -9 take

I am writing a custom process manager, that executes commands and monitors their execution. On their termination sometimes I want to terminate some running processes and execute other processes. I ...
debnatkh's user avatar
0 votes
1 answer
109 views

mpirun kill parallel processes when lose internet connection ssh

When I'm connected via ssh and are parallel processes running and it loses the internet connection all parallel processes. When I reconnect I find the following message in log file: -------------------...
gvd's user avatar
  • 111
1 vote
1 answer
979 views

Difference between kill -9 and -19?

I normally use kill command to kill processes. Sometimes it's not killed only with kill command. Then I use -9 option. I've checked the man page of kill command. $ kill -l 1) SIGHUP 2) SIGINT 3) ...
Hardguy's user avatar
  • 59
0 votes
2 answers
524 views

Using -exec with kill command

I am trying to execute the following command in which I use the kill and exec commands. kill -l -exec grep -i 'term' {} + Since, kill -l returns a list of all kill signals, I want to find all those ...
MathMan's user avatar
  • 181
1 vote
2 answers
723 views

Killing multiple process by process name using shell script

I am having a shell script, which will start processes and kills the process. It is accepting the processes names as arguments. Need to find the pid and kill those. Initially, it was like for procname ...
Shashank Gb's user avatar
2 votes
2 answers
2k views

How to kill watchdog Daemon on Linux

I configured my watchdog.conf, and i want try if my computer restart when it crash. so, I wanted kill my Watchdog to try if my computer will restart. But I try to killed it with the command "...
Zapsalis's user avatar
0 votes
0 answers
94 views

ps | grep returns two PIDs [duplicate]

I am trying to write an init.d script, I am trying to kill a named node process: kill $(ps aux | grep 'eproxy' | awk '{print $2}') The problem is, when running just the ps command on it's own, I am ...
JLCarveth's user avatar
1 vote
0 answers
244 views

Process makes other processes hang

At some point, a number of scripts seemed to hang for no apparent reason. Running them manually still worked. I narrowed it down to a ps -ef that hanged. After a number of processes, output just ...
Ljm Dullaart's user avatar
  • 4,863
0 votes
2 answers
1k views

When is mandatory send SIGINT programmatically?

I know the recommendable way to terminate a foreground process is through the SIGTERM signal, it because it gives the opportunity to the process itself to clean/release resources. This signal only can ...
Manuel Jordan's user avatar
7 votes
1 answer
970 views

What is correct or suggested approach to send the signal name through 'kill' command?

I read many tutorials about the use of kill command, mostly 3 approaches kill -15 <pid> kill -SIGTERM <pid> kill -TERM <pid> For scripts purposes and for portability with macos too, ...
Manuel Jordan's user avatar
4 votes
3 answers
2k views

Why are the signal lists for kill, killall and pkill not the same?

I researched the kill, pkill and killall commands, and I understood most of their differences. However, I am confused about their signals: If I run kill -l, I see: 1) SIGHUP 2) SIGINT 3) ...
Manuel Jordan's user avatar
5 votes
0 answers
331 views

Why does ps not exit when listing full command line arguments? [duplicate]

Any time I attempt to run the ps command or another similar command in a way that would make it output the arguments for any process, the command runs and produces output, but then freezes, entering ...
AJMansfield's user avatar
0 votes
2 answers
1k views

Bash script with while loop that waits for a file to be refreshed but kills if time threshold is exceeded

I am very basic with bash so apologies if this is obvious to solve and please let me know if more details are needed. The script below is part of a larger script to launch a python workflow and wait ...
Taycano's user avatar
3 votes
1 answer
553 views

Resume killed job

I accidentally closed a terminal window where I had limited the cpu usage of a parallel job. Now, if I ps -e S in a new terminal window, I can see that job as: 311029 pts/0 TN+ 275:25 jobname Is ...
Py-ser's user avatar
  • 369
2 votes
1 answer
480 views

How do I disable csd-wacom?

I would also like to know how to permanently disable csd-wacom since I don't have a Wacom tablet and csd-wacom is wasting resources and the question regarding how to disable it wasn't answered.
Nunya Bizness's user avatar
2 votes
1 answer
131 views

How do I stop xclock restarting at every system startup

I use Linux Mint on one of my machines. The other day I tried xclock via Terminal command line. I then found I couldn't stop, end or kill it. Or rather I could kill it but it immediately restarted. ...
PotatoCrisp's user avatar
-2 votes
2 answers
129 views

how to kill huge process by killing the daemon itself

on our rhel machine we saw huge lines as ( total lines numbers are 856 ) that cause very high cpu load average root 110490 108840 0 07:32 ? 00:00:00 /usr/bin/python /var/tmp/get_params/...
yael's user avatar
  • 13.4k
3 votes
3 answers
873 views

Use xargs and kill in script with optional signal

A script for terminating a server on a certain port: #!/bin/bash PORT="$1" SIGNAL="$2" if [ "${SIGNAL}" != "" ]; then SIGNAL=" -${SIGNAL}"; fi lsof ...
lonix's user avatar
  • 1,793

1
2 3 4 5
14