Questions tagged [kill]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
38 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 '/...
  • 61
0 votes
1 answer
35 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 ...
  • 101
0 votes
2 answers
58 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 ... ...
  • 1
1 vote
0 answers
339 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?
1 vote
2 answers
49 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 $...
1 vote
0 answers
170 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 ...
  • 8,013
1 vote
0 answers
79 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 ...
0 votes
1 answer
40 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: -------------------...
  • 111
0 votes
1 answer
166 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) ...
  • 39
0 votes
2 answers
100 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 ...
  • 171
1 vote
2 answers
297 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 ...
1 vote
2 answers
395 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 "...
0 votes
0 answers
91 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 ...
1 vote
0 answers
136 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 ...
  • 3,627
0 votes
2 answers
483 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 ...
6 votes
1 answer
640 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, ...
4 votes
3 answers
1k 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) ...
5 votes
0 answers
220 views

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

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 ...
0 votes
0 answers
67 views

Unable to kill node process on RedHat Linux

This is my OS: [root@efendibey_live nginx]$ uname -a Linux efendibey_live 3.10.0-1160.6.1.el7.x86_64 #1 SMP Tue Nov 17 13:59:11 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux [root@efendibey_live nginx]$ ...
  • 417
0 votes
2 answers
460 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 ...
2 votes
1 answer
381 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 ...
  • 339
2 votes
1 answer
140 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.
2 votes
1 answer
61 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. ...
-2 votes
2 answers
81 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/...
  • 11.9k
3 votes
3 answers
598 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 ...
  • 1,541
2 votes
2 answers
297 views

killall firefox does not kill firefox

When I had loads of firefox windows open and wanted to close them quickly I did killall firefox using killall from the psmisc package in Ubuntu. Nothing happened. I looked in the list of my processes ...
32 votes
5 answers
6k views

Ctrl+Alt+Del equivalent on Linux? [duplicate]

I foolishly started a job that turned out to be so big and busy that it froze everything. I wish I could type a kill command or use xkill, but the system is unresponsive, apart from the audible ...
  • 725
0 votes
1 answer
187 views

why when hooking syscalls from the kernel, is the pid of kill, zsh, but the pid of mkdir is mkdir?

I am writing my own rootkit to learn about Linux kernels. I wanted to hook into a syscall and alter the credentials of the current task to be that of roots (i.e.euid=0). I saw you could do this with ...
0 votes
1 answer
193 views

Why can't I kill this process with a negative number?

I want only one instance of my shell script to run at once, with new ones killing old ones. I'm on Linux, and thought this was a good approach: # Terminate other instances by name and name self. kill -...
  • 5
1 vote
1 answer
431 views

find & kill the processes on mount point folder before umont

I just wonder if somewhere we have some command that gives the following we have server - RHEL 7.2 redhat version usually before umount on mount point folder , we need to kill the PIDS that related ...
  • 11.9k
0 votes
1 answer
262 views

How do I kill a process and ensure that port bindings are cleaned up?

I have a situation where I kill a process, but when restarting it, I get the Address already in use error. I am running sudo netstat -lntp to get the process ID, which returns, for example: tcp ...
2 votes
2 answers
387 views

Why does kill --timeout not work? [duplicate]

When I try to execute this command which is valid according to man 1 kill I receive an error instead of proper functionality. $ kill --timeout 1000 TERM --signal QUIT 12345 bash: kill: -timeout: ...
1 vote
0 answers
38 views

Is it possible to disable kill option from GNOME System Monitor context menu?

Is there a way to prevent Gnome System Monitor from providing kill option in the context menu for a given process ? If you can't help but asking why I want this, I was assigned the (perplexing) task ...
  • 308
1 vote
1 answer
976 views

How to end/kill all incoming SSH connections?

I am developing a some code in order to communicate between a PC and a Raspberry Pi via SSH. When the PC opens a SSH connection to the RPi a window with a short message pops up on the RPi's screen. ...
  • 11
0 votes
3 answers
101 views

How can I use systemd to kill a program when another program is not running

I'd like that when the program spotify-tui is closed, the service kill spotifyd. How would you write a service like that?
1 vote
2 answers
651 views

Kill process once it produces certain output

I'm running a program which executes (mostly) correctly, but then hangs. I'd like to run the program such that once it outputs a certain string, or stops producing output it gets killed. The output ...
0 votes
2 answers
38 views

How do I determine what task is launching another task

I am dealing with some essentially virus-like behavior that I'd like to end. A task 'foo' is running on my computer, generating a lot of calls that are bringing my system performance to its knees. I ...
1 vote
1 answer
645 views

How to kill chrome under Linux so that it'll resume next time

How to kill chrome under Linux so that it'll resume/restore the sessions when it is started next time? It's a trivial thing to do under Windows, but under Linux, no matter how I tried to kill chrome, ...
  • 885
0 votes
0 answers
167 views

process not killed even we used kill -9 and process actually was belong to container that already removed

here is a strange behavior that show how to kill a process , but actually process not killed example ( from rhel 7.6 server ) ps -ef | grep kafka-exporter root 15340 19528 0 17:25 pts/0 00:00:...
  • 11.9k
0 votes
3 answers
331 views

How to kill proccess running more than x seconds by process name?

I would like to kill all chrome processes that are running for more than 30 seconds. At the moment i'm using this command below, but it kills all chrome processes regardless: killall -9 chrome
  • 13
3 votes
0 answers
170 views

Running process (not a zombie) that's impossible to kill

Yes, I know this question has been asked tens if not hundreds of times before. Still, I went through all similar questions and tried everything listed on them, to no avail. After compiling some code ...
  • 131
1 vote
1 answer
286 views

Killing `sleep` in a subshell

In bash, I'm observing that calling kill on a sleeping process won't kill it if I start out with a subshell. Can you help me understand why? function foo () { # Start a loop with `sleep` in the ...
0 votes
1 answer
33 views

Why does a command called by its name behave differently when it is called by full path?

I wanted to use kill --verbose ... in a bash script but I got the error kill: -verbose: invalid signal specification. This was weird as it worked fine in fish. My investigation has lead me to this ...
  • 221
-1 votes
1 answer
60 views

kill -9 backgrounded job also kills bash [closed]

sleep 1 & kill -9 $? The above will kill either (most likely) the bash shell or the current terminal window. Why is that? NOTE: sleep 1 & kill $? does not kill the shell/terminal. Just to be ...
  • 433
1 vote
1 answer
1k views

Using a wildcard with "killall" doesn't work other than from /tmp

I have /tmp/bash.sh that contains a script like this: killall name* It works fine if I go to /tmp folder and then run ./bash.sh, but if I go to / then run /tmp/bash.sh or ./tmp/bash.sh it doesn't ...
0 votes
1 answer
44 views

All processes using a device got hung and even `kill -9` does nothing

I have an old HDD which failed and I'm trying to recover what's possible with testdisk. The plan was to use dd to make an image and then use testdisk to recover files from the image to avoid damaging ...
  • 1
0 votes
1 answer
74 views

Catch process which exits immediately and respawns fast

On Linux server there are many log messages like these: Jul 17 09:22:34 sweden sudo[3631848]: pam_unix(sudo:auth): auth could not identify password for [myuser] Jul 17 09:22:34 sweden sudo[3631848]: ...
  • 1
0 votes
1 answer
448 views

How do you completely exit mysqld_safe or kill it?

I opened mysqld_safe for some reason in Linux but now I can't completely exit or kill it! Closing the terminal didn't help. Then I tried with kill -9 <process id(s)> and I killed 2 processes but ...
1 vote
1 answer
552 views

Get Window title from PID

I want to kill a terminal session based of the pid and title name. Lets say pidof returns 55175 as pid, the window title is TestWindow, I've set it with alacritty -t "TestWindow". Killing ...
  • 17
0 votes
1 answer
893 views

How to gracefully kill (like normal close) Google Chrome (over SSH)?

I am running a "TV laptop" - just a low-powered laptop connected to a TV with one single purpose, to run a live TV stream from Google Chrome on Ubuntu MATE 20.04.2 LTS. The first thing I ...

1
2 3 4 5
14