Questions tagged [kill]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 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 ...
user avatar
0 votes
2 answers
64 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 ...
user avatar
6 votes
1 answer
475 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, ...
user avatar
4 votes
3 answers
910 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) ...
user avatar
-2 votes
0 answers
69 views

A script that terminates all processes owned by the current user, that have used more than 1 minute CPU time

How would I write a script that terminates all processes owned by the current user whose machine time (TIME column in ps output, which I believe is the CPU time) is greater than 1 minute?
user avatar
  • 17
5 votes
0 answers
67 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 ...
user avatar
0 votes
0 answers
16 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]$ ...
user avatar
  • 297
0 votes
2 answers
35 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 ...
user avatar
2 votes
1 answer
254 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 ...
user avatar
  • 309
0 votes
0 answers
15 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.
user avatar
2 votes
1 answer
31 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. ...
user avatar
-2 votes
2 answers
34 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/...
user avatar
  • 10.9k
3 votes
3 answers
455 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 ...
user avatar
  • 1,413
2 votes
2 answers
107 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 ...
user avatar
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 ...
user avatar
  • 705
0 votes
1 answer
63 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 ...
user avatar
0 votes
1 answer
55 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 -...
user avatar
  • 5
1 vote
1 answer
72 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 ...
user avatar
  • 10.9k
0 votes
1 answer
57 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 ...
user avatar
2 votes
2 answers
104 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: ...
user avatar
0 votes
0 answers
51 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 ...
user avatar
1 vote
0 answers
29 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 ...
user avatar
  • 298
0 votes
1 answer
156 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. ...
user avatar
  • 1
0 votes
3 answers
44 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?
user avatar
0 votes
2 answers
155 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 ...
user avatar
0 votes
2 answers
24 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 ...
user avatar
0 votes
1 answer
63 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, ...
user avatar
  • 485
0 votes
0 answers
87 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:...
user avatar
  • 10.9k
0 votes
3 answers
104 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
user avatar
  • 13
3 votes
0 answers
88 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 ...
user avatar
  • 131
1 vote
1 answer
69 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 ...
user avatar
0 votes
1 answer
29 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 ...
user avatar
  • 221
-1 votes
1 answer
51 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 ...
user avatar
  • 411
1 vote
1 answer
495 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 ...
user avatar
0 votes
1 answer
37 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 ...
user avatar
  • 1
0 votes
1 answer
39 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]: ...
user avatar
  • 1
0 votes
1 answer
188 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 ...
user avatar
1 vote
1 answer
250 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 ...
user avatar
  • 17
0 votes
0 answers
58 views

How to kill processes waiting for frozen md raid?

Long story short, I had a frozen md raid and while trying to tear it down, I hit the following problem: # umount /path/to/mount/point umount: /path/to/mount/point: target is busy. # fuser -av -M -m /...
user avatar
0 votes
1 answer
170 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 ...
user avatar
2 votes
1 answer
115 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 ...
user avatar
4 votes
1 answer
1k 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....
user avatar
1 vote
1 answer
549 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 ...
user avatar
  • 113
0 votes
2 answers
718 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 ...
user avatar
0 votes
1 answer
295 views

How to kill 'invisible' process using port

On a linux machine, am trying to start Glassfish server. ./startserv This returns the following message: There is a process already running using the admin port 4848 -- it is probably another ...
user avatar
0 votes
2 answers
77 views

Is there a way to trigger the closing of one program by closing another? A shell script perhaps?

So, my situation is this: I have created a launcher, key bindings and an alias that opens GLava and CMus in a drop-down terminal at the same time, using this shell script: #!/bin/bash c=$(ps -e | ...
user avatar
-1 votes
3 answers
85 views

Is it possible to kill a program without access to htop and the likes?

Just now I opened a game which launched directly to black screen. I could hear the music in the background and see when I moved the cursor, but I couldn't Alt+Tab nor Alt+F4. I wanted to try Alt+F2 ...
user avatar
  • 768
1 vote
2 answers
77 views

Close recently opened process in .sh

I am new to Linux and trying to learn how to launch and close processes automatically. Eventually I would like to run this/a similar process with cron. Here, just testing "checking in" to ...
user avatar
0 votes
1 answer
152 views

Why I can't send SIGRTMAX-9 signal with kill command?

I have a bash script running in the background and wanted to send the SIGRTMAX-9 signal to it. SIGRTMAX-* case Why kill command doesn't recognize the SIGRTMAX-9 signal? ╭─ /tmp/tmp.KHFbrCQhOB ...
user avatar
  • 1
1 vote
1 answer
35 views

what is the right way to know all script PIDS that runs under folder

Under the folder /home/testing/scripts on a Linux machine, we have 234 different scripts that do sanity and testing as /home/testing/scripts/test.network.py /home/testing/scripts/test.hw.py /home/...
user avatar
  • 10.9k

1
2 3 4 5
13