SUT Home

ptkillall

SUT killall

Description

ptkillall kills named processes on given hosts

Command Line Arguments

ptkillall [-m <machine_file>|-M <machine_list>] [<signal>] <pname>

-m <machine_file>
Specify a file with a list of destination machines. It is incorrect to use this with the -M option. This option must preceed all others.

-M <machine_list>
Specify a list of destination machines. The entire list must be surrounded by quotes. It is incorrect to use this with the -m option. This option must preceed all others. . <signal> - The signal to send. Can be a number or a name. If not given, the default signal is sent (see NOTES below and killall(1), pkill(1)).
<pname>
The name of the process to kill

Environment Variables

PT_MACHINE_FILE
If PT_MACHINE_FILE is set, the command will attempt to open the file whose name is stored in PT_MACHINE_FILE. This will be used if neither the -m or -M options are given.

Examples

To kill all processes named 'runaway' on the machines specified in the file "destination_machines" use

ptkillall -m destination_machines runaway

To kill the same processes, but specifying the machines on the command line, use

ptkillall -M "host1 host2 host3" runaway

To kill the same processes, but specifying the signal 9, use

ptkillall -m destination_machines -9 runaway

To kill the same processes, but specifying the signal SIGKILL, use

ptkillall -m destination_machines SIGKILL runaway

Notes

This command simply calls killall(1) on Linux and IRIX. It calls pkill(1) on Solaris. It is unavailable on other systems.

See Also

killall(1), pkill(1), SUT(1)







Contact Emil Ong about issues concerning this page.