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

learn more… | top users | synonyms

1
vote
1answer
38 views

How to programatically disconnect a ssh user?

I need to force a disconnect all sessions for a given user. Since this user might be root as well I think it would be better to avoid killing the parent sshd process along the way. Is there a ...
0
votes
1answer
54 views

How to extract all links from a given url in a decent time

I'm trying to extract the links from a specified url and redirect them to a file. At first I tried using --spider , this is my code: wget --spider --force-html -m http://file/path 2>&1 | grep ...
2
votes
0answers
115 views

killall doesn't work if I call it from a script

I'm starting a tcpdump inside a script and I also kill it from the same script. So I'm currently using the killall command for this: The script gets executed from an udev rule: This is the section, ...
1
vote
1answer
430 views

How to kill all processes using a given GPU?

I use the CUDA toolkit to perform some computations on my Nvidia GPUs. How to kill all processes that use a given GPU? (killing at once, i.e. without having to manually type the PIDs behind kill -9.) ...
1
vote
1answer
173 views

wait for predefined time before exit the script

I have an app server running in my unix box with process name as abc_test. I have a shell script in which I have to stop my server using /opt/abc/bin/stop. Now sometimes my server doesn't get stopped ...
0
votes
2answers
122 views

Shell script to kill processes except those owned by user

I am Looking for some help in creating a script to kill processes, but return an error message if they are owned by root. Firstly I would like to say that I am a total beginner at this. At the moment ...
1
vote
1answer
108 views

Kill process on specific port

It has been asked before but how to do it with OpenBSD? I tried some different method but none worked. $ sudo fuser -k 80/tcp fuser: 80/tcp: No such file or directory $ kill $(sudo lsof -t -i:80) ...
0
votes
1answer
26 views

Can't find logical fault in script which should execute a tcpdump

I have written a script which compares the time and if it is the same start time like the current time and not like the end time it starts a tcpdump. And If the end time is like the current time it ...
0
votes
3answers
344 views

How to kill a command executed from a script?

I would like to start a tcpdump in my own script an after some time I would like to kill it again. How can I access the PID from the tcpdump. I tried it with $$ , but this only kills the script. if [[...
2
votes
2answers
94 views

How to kill line of PID?

I have process which created multiple PID's. I want to kill all those PID's. I have tried pkill <process_name>. But PID not getting killed as they were wait to resource releasing. I have ...
1
vote
2answers
113 views

Is it possible to kill another user's process using sudo privileges?

I have sudo privileges on my home desktop running Fedora 22. I created a newuser with sudo useradd newuser and sudo passwd newuser. I then logged in as this newuser with su newuser, then switched back ...
0
votes
2answers
250 views

Creating an automated idle process kill script

I would like to implement a solution to a specific instance of the generic problem wherein idle users tie up resources. I know the user list can be retrieved with w, the associated PID with ps, and ...
0
votes
1answer
90 views

pkill in a script

I am trying to kill a process by his name in a script. Process : toto 15408 1 0 Nov13 ? 00:20:36 java -Xmx512m -XX:MaxPermSize=128m -cp /local/toto//conf/:/local/toto//lib/* com.toto....
2
votes
2answers
247 views

umount stalled and unable to kill its process

Sometimes when I remove SD card I can notice that when I reinsert it - it doesn't mount by itself. Also I've notice that umount process is stalled and I cannot kill it (not even with -9). I use Ubuntu ...
3
votes
1answer
73 views

Why does kill not work from script, but does work from terminal?

I have the following contrived script to illustrate my issue: #!/bin/bash set -eux sudo sleep 120 & spid=$! sleep 1 sudo kill $spid wait $! This will print $ ./test.sh + spid=21931 + sleep 1 +...
0
votes
0answers
31 views

Suspend using systemctl's hibernation scripts

The man page (or something similar, can't remember) of systemctl says tells us that we can put user-defined scripts into the system-sleep directory. All scripts in there will be executed before any ...
1
vote
1answer
276 views

How can I kill a program started from rc.local when Ctrl-C doesn't work?

I was trying to create a program that runs at start-up that takes a picture every 10 seconds (In a infinite loop) on my raspberry pi but I discovered I had made a mistake but couldn't Ctrl+C out of it....
2
votes
2answers
44 views

Can a tty be made unkillable?

I used PuTTY to ssh into a linux machine from a windows machine and I was just messing about with the pkill command. I quickly found out that I could log out of a remote session by typing w to show ...
2
votes
1answer
49 views

How does kill by pgid affect new subprocesses?

I have a very complicated application, which has its init-script and main service runs as a daemon. I want to stop it fast and gracefully, so I used this in stop() function: group_id=$(ps -o pgid= $(...
2
votes
3answers
96 views

How to make init script print “OK” only when all subprocesses are stopped?

I have a very complex python application. It has it's own init script, but when I execute: sudo service my_service_daemon stop It prints "Stopping my_service_daemon [OK]", but in real ...
1
vote
1answer
412 views

AIX and oracle: aioserver process won't die

When shutdown an oracle server I see this error message at exit umount /oracle/ umount: error unmounting /dev/oracle: Device busy lsof and fuser report nothing but ps aux|grep oracle report this ...
1
vote
0answers
81 views

CentOS Running process not responding to kill signals and not context switched

An updatedb process on my linux server is not responding to kill signals. (kill -9 or SIGSTOP) [root@chroot-1 ~]# ps auwx | grep -i 4505 root 4505 99.5 0.0 59544 1256 ? RN 09:43 112:...
3
votes
1answer
61 views

How do I know which Mosh Client I am?

When I try who, I frequently see output such as this: username pts/0 2015-10-09 04:48 (mosh [2680]) username pts/2 2015-10-12 00:04 (75.139.11.119 via mosh [12364]) username pts/6 ...
1
vote
1answer
213 views

pkill with regex

I have few java processes running like below, java -jar /my/path/to/app/myapp.jar java -jar /my/path/to/app/prodapp.jar java -jar /my/path/to/app/testapp.jar java -jar /my/path/to/app/myapp_v.01....
0
votes
1answer
246 views

ps finds process, kill doesn't [duplicate]

Specifications [midas@localhost ~]$ uname -a Linux localhost.localdomain 4.0.4-301.fc22.x86_64 #1 SMP Thu May 21 13:10:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux and [midas@localhost ~]$ cat /etc/...
2
votes
1answer
59 views

Trying to Write a Script to Kill Processes based on niceness

I am trying to write a script in bash that will kill any of my own processes (and run indefinitely) if those processes have a niceness value of 4 or lower. Can anyone tell me what might be wrong? ...
1
vote
1answer
120 views

Unable to kill process, even with root. How to diagnose?

There are a lot of bash processes running on my Ubuntu Linux (12.04). Even when I close the terminal they are still shown in the System Monitor. I tried killing them as below, but they remain as it ...
1
vote
1answer
47 views

List of killed apps

Is there a command to list latest killed processes? Or to search through log file for killed app, for example called "my_app"?
12
votes
3answers
3k views

Make a process unkillable on Linux

I'm working on a password manager application, and for security reasons I want to launch an unkillable process. And besides I don't want this program to be a daemon since I need to read from standard ...
0
votes
0answers
89 views

program “killed” as soon as it runs

Ubuntu 12.04 I have success with make, and output a program name algo. When I type ./algo,the terminal just directly shows 'killed' And I searched the var/log/message or syslog kern.log. I don't ...
0
votes
1answer
346 views

I cannot kill crond - trying to stop cron service

This is frustrating, I try: service crond status And get this: Redirecting to /bin/systemctl status crond.service crond.service - Command Scheduler Loaded: loaded (/usr/lib/systemd/system/crond....
9
votes
2answers
2k views

Kill a suspended process?

I was slightly confused by: % vim tmp zsh: suspended vim tmp % kill %1 % jobs [1] + suspended vim tmp % kill -SIGINT %1 % jobs [1] + suspended vim tmp % kill -INT %1 % jobs [1] + suspended ...
0
votes
3answers
133 views

Killing a comet zombie

I have a zombie process that is changing its PID, which is increasing. Is it possible to kill a process with PID greater than N?
1
vote
1answer
175 views

Killing PGIDs but proceses are respawning, how do I make it persistent?

I ran ps aux --forest -j to see parent and child processes. Here is an example: root 3744 3744 3744 0.0 0.2 77084 4160 ? Ss 09:34 0:00 /usr/sbin/cupsd -f lp 3747 3747 ...
1
vote
1answer
133 views

Why kill -9 -1 doesn't work?

From man kill: kill -9 -1       Kill all processes you can kill. But when I do sudo /bin/kill -9 -1 nothing happens. My uname -a for info: Linux michal-Q530 ...
1
vote
0answers
65 views

Why process is killed while a lot of memory is free?

I am running a python script in ipython. This script will take about 8GB RAM. The system has more than 80 GB free RAM but the swap is nearly 0. My script was killed after it runned for a while. I want ...
3
votes
1answer
218 views

How to kill a task that cannot be killed (uninterruptable?)

I have a task running that blocks pm-hibernate (on Linux 4.0.7-2). When I try pm-hibernate there is an error message "Freezing of tasks failed after 20.002 seconds (1 tasks refusing to freeze, ...
2
votes
2answers
402 views

How do I kill a process after detaching it from bash?

I have multiple scripts that detach a process from bash using nohup and &>/dev/null &. My question is, how do I kill the process after completely detaching it from bash. using killall or ...
3
votes
2answers
249 views

bash + how to hold shell scripts

Is it possible to hold/stop the bash script progress without to kill the process? ( by kill command ) or other command For example this script - install_linux_pkgs.bash , will install Linux pkgs ...
0
votes
1answer
2k views

kill processes in one line with kill, awk, ps, and grep

I have a few processes that spring up and I am able to print a line of the pgid's that I would like to enter into a kill command. here is what I have: sudo ps o pgid,args | grep mininet: | sudo awk '{...
9
votes
1answer
1k views

Still alive, still alive after kill -9 / SIGKILL [duplicate]

An apache2 process got stuck on my server and caused problems with other services. (original problem: kerneloops after USB hardware disconnect) root@server:~# ps aux | grep apache2 | grep -v grep ...
2
votes
1answer
131 views

Can I resume make after a Ctrl+C?

I am installing gcc version 5.1 on a supercomputer cluster. I configured it and am now running the make command. It has been several hours and is still running as it is a long install, but the work ...
2
votes
6answers
405 views

How to close all proceses without restarting a machine?

I have a lot of processes running and I need to kill them all. How can I do this without restarting a machine?
1
vote
1answer
69 views

Stopping jobs by PID?

Could someone tell me why I am unable to kill the jobs below when specifying their PID? I can stop the jobs when using their % id. Mac:~ gd$ ps PID TTY TIME CMD 4523 ttys000 0:00.02 -...
2
votes
3answers
69 views

Bash | port killing loop fails

I am trying to create a bash function which should kill all processes using some ports specified in port_array. The kill-port function works if I call it myself with a port e.g. with kill-port "80";. ...
1
vote
1answer
45 views

Is Ctrl+C on make check safe?

I am installing GNU Guile and I have ran ./configure ... as well as make. I am now running make check and it is taking a really really long time. If I use Ctrl+C to abort this make check, will it mess ...
4
votes
2answers
132 views

How to kill a bunch of jobs based on ps output?

Here is output from ps: $ ps aux | grep blob ubuntu 4286 0.0 0.1 34748 9592 ? S Jan14 0:00 /usr/bin/python /usr/local/bin/pynt start_blob_reader ubuntu 4287 0.0 0.1 34748 ...
4
votes
2answers
3k views

kill: SIGSTOP: invalid signal specification error in bash script

When I use kill on command line it works. kill -SIGSTOP 1234 But if I use in bash script file I get this error: kill: SIGSTOP: invalid signal specification sh file is #!/bin/sh kill -SIGSTOP ...
3
votes
1answer
147 views

What could be happening between pidof and kill to cause “no such process”?

I've inherited quite a bit of code and am looking at a cron job that restarts a service once an hour, no other scripts touch this process and this code is ran. #The name of the process has been ...
1
vote
2answers
71 views

How to keep a process from running?

I can kill a process. But how do I keep that process from being called up again without removing it from Linux? For example, if I run something like netstat to find the port associated with the ...