08-26-2009
I'm backing off because the OP cannot provide basic details about the Operating System and shell. This is fundamental to killing processes.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
can I do
ps -ef | grep <process_name>
and kill the process is it exists?
and send a mail to me that the process was found and killed
Thanks much...
KS (4 Replies)
Discussion started by: skotapal
4 Replies
2. Shell Programming and Scripting
Hi All,
I have a written a script in korn shell for importing data into a oracle database. The shell invokes the import within the script. I want to kill this import (child process) . I tries using trap, but this does not kill the import even if i press cnt c. i have to login into other terminal... (2 Replies)
Discussion started by: yerics
2 Replies
3. AIX
Hey all. I'm brand new to this forum and am looking for some help. I have a script that verifies that the backup tapes are working correctly. Basically is uses 1 command: restore -xpqvf > rootvglog
I use this for each volume group that we have. We run this everyday but the problem is, we... (4 Replies)
Discussion started by: jalge2
4 Replies
4. Shell Programming and Scripting
i am using script to connect remotly to server and run some commands , one of these commands is to kill some process but tried different ways with no hope
sshpass -p 'pass' ssh -o StrictHostKeyChecking=no server kill -9 `pgrep procs`
getting error message "kill: bad argument count"
... (2 Replies)
Discussion started by: mogabr
2 Replies
5. Shell Programming and Scripting
I had issues with processes locking up. This script checks for processes and kills them if they are older than a certain time.
Its uses some functions you'll need to define or remove, like slog() which I use for logging, and is_running() which checks if this script is already running so you can... (0 Replies)
Discussion started by: sukerman
0 Replies
6. Shell Programming and Scripting
Hi,
I am trying to automate the killing of named processes of which I found a good solution here on the forums but as I am pretty much a begginer to linux I am having an issue. The code I found is:
kill $(ps -ef | nawk '/monitoreo start/ { print $2}'}
but what I want to do is replace... (3 Replies)
Discussion started by: TylrRssl1
3 Replies
7. Shell Programming and Scripting
Hello All,
i hope you are fine.
I need a little help from you people--
inside a script i want to kill a parent process by checking it with the child process..
p_pid=`ps -e | awk '/ra_cmd_d/ {print$1}'`
here i am selecting the child process id in p_pid.
next--
sleep_pid=`ps -af |... (3 Replies)
Discussion started by: onlyniladri
3 Replies
8. UNIX for Dummies Questions & Answers
Hello all,
I need to write a shell script that does the following; Allows you to kill a job,(1) listing only the jobs you own, (2) asks for which job to kill, (3) kills the job and (4) confirms kill...
I am not sure if I need to first run the job command and pipe it with kill? Which options... (6 Replies)
Discussion started by: citizencro
6 Replies
9. UNIX for Dummies Questions & Answers
I was just playing with the processes and suddenly a question striked my mind:
What will happen if we kill directly the shell process?? :rolleyes:
Do anyone know?
Will the system shutdown?
Or the system wont let it be killed? (5 Replies)
Discussion started by: paras.oriental
5 Replies
10. Shell Programming and Scripting
I followed the directions here
Free Twitter Source Code ? Twitter Database Server: Install
and created a php script that enters twitter keyword searches into a MySQL DB.
When you execute the files outlined in the above link, a script starts indefinitely.
I've noticed that the scripts... (6 Replies)
Discussion started by: phpchick
6 Replies
LEARN ABOUT DEBIAN
systemd.kill
SYSTEMD.KILL(5) systemd.kill SYSTEMD.KILL(5)
NAME
systemd.kill - Process killing procedure configuration
SYNOPSIS
service.service, socket.socket, mount.mount, swap.swap, scope.scope
DESCRIPTION
Unit configuration files for services, sockets, mount points, swap devices and scopes share a subset of configuration options which define
the killing procedure of processes belonging to the unit.
This man page lists the configuration options shared by these five unit types. See systemd.unit(5) for the common options shared by all
unit configuration files, and systemd.service(5), systemd.socket(5), systemd.swap(5), systemd.mount(5) and systemd.scope(5) for more
information on the configuration file options specific to each unit type.
The kill procedure configuration options are configured in the [Service], [Socket], [Mount] or [Swap] section, depending on the unit type.
OPTIONS
KillMode=
Specifies how processes of this unit shall be killed. One of control-group, process, mixed, none.
If set to control-group, all remaining processes in the control group of this unit will be killed on unit stop (for services: after the
stop command is executed, as configured with ExecStop=). If set to process, only the main process itself is killed. If set to mixed,
the SIGTERM signal (see below) is sent to the main process while the subsequent SIGKILL signal (see below) is sent to all remaining
processes of the unit's control group. If set to none, no process is killed. In this case, only the stop command will be executed on
unit stop, but no process be killed otherwise. Processes remaining alive after stop are left in their control group and the control
group continues to exist after stop unless it is empty.
Processes will first be terminated via SIGTERM (unless the signal to send is changed via KillSignal=). Optionally, this is immediately
followed by a SIGHUP (if enabled with SendSIGHUP=). If then, after a delay (configured via the TimeoutStopSec= option), processes still
remain, the termination request is repeated with the SIGKILL signal (unless this is disabled via the SendSIGKILL= option). See kill(2)
for more information.
Defaults to control-group.
KillSignal=
Specifies which signal to use when killing a service. This controls the signal that is sent as first step of shutting down a unit (see
above), and is usually followed by SIGKILL (see above and below). For a list of valid signals, see signal(7). Defaults to SIGTERM.
Note that, right after sending the signal specified in this setting, systemd will always send SIGCONT, to ensure that even suspended
tasks can be terminated cleanly.
SendSIGHUP=
Specifies whether to send SIGHUP to remaining processes immediately after sending the signal configured with KillSignal=. This is
useful to indicate to shells and shell-like programs that their connection has been severed. Takes a boolean value. Defaults to "no".
SendSIGKILL=
Specifies whether to send SIGKILL to remaining processes after a timeout, if the normal shutdown procedure left processes of the
service around. Takes a boolean value. Defaults to "yes".
SEE ALSO
systemd(1), systemctl(1), journalctl(8), systemd.unit(5), systemd.service(5), systemd.socket(5), systemd.swap(5), systemd.mount(5),
systemd.exec(5), systemd.directives(7), kill(2), signal(7)
systemd 237 SYSTEMD.KILL(5)