Questions tagged [kill]

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

Filter by
Sorted by
Tagged with
1 vote
0 answers
51 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
22 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
68 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) ...
  • 17
0 votes
2 answers
47 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
108 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
1 answer
83 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
23 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
59 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,437
0 votes
0 answers
18 views

How to kill and disable rslsync?

My system is Arch+kde. The rslsync processes are auto-started and I want to turn them off. I tried systemctl list-unit-files | grep enabled | grep rslsync It returns nothing. I also checked System ...
0 votes
2 answers
253 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
535 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
130 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
31 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]$ ...
  • 405
0 votes
2 answers
188 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
320 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 ...
  • 319
0 votes
0 answers
50 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
42 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
52 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.4k
3 votes
3 answers
519 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,511
2 votes
2 answers
186 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
5k 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 ...
  • 705
0 votes
1 answer
117 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
119 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
166 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.4k
0 votes
1 answer
125 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
208 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: ...
0 votes
0 answers
75 views

Unable to killall bash in Arch

I used to use to killall bash command often to kill idle terminal windows while I was on Ubuntu. Recently I switched to Arch. If I use killall bash nothing happens. Instead of that if I use killall -9 ...
1 vote
0 answers
33 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
475 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
76 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
342 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
27 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 ...
0 votes
1 answer
252 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, ...
  • 720
0 votes
0 answers
130 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.4k
0 votes
3 answers
187 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
123 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
172 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
31 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
52 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 ...
  • 409
1 vote
1 answer
823 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
41 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
51 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
319 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
383 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
523 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 ...
2 votes
1 answer
143 views

Kill processes only if a specific number of PIDs match criteria

I am trying to improve this one liner I use as an (abused) docker-compose healthcheck that runs inside a container: ps -C program.bin -o pid,pcpu --no-headers | awk '$2 > 98 {print $1}' | xargs ...
4 votes
1 answer
2k views

Delete / Kill a process which won't die

I'm using Linux Ubuntu 20.04. I have a process with PID 21: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 21 root 20 0 0 0 0 S 0.0 0.0 0:00....
1 vote
1 answer
866 views

Dynamic changing PID - nohup process not killable - Linux

I have started a python script by following: nohup python src/myscript.py & Now there is a process running, where the PID is changing constantly, so it is absolutely not possible to kill it. When ...
  • 113
0 votes
2 answers
1k views

How to check if a java process in unix is killed?

I have a java application on Unix. This application unexpectedly stops. I am looking for what is the problem. How can I tell in a java process started on Unix, if this process is being killed? (with ...

1
2 3 4 5
14