diff options
Diffstat (limited to '')
-rw-r--r-- | doc/killall.1 | 178 |
1 files changed, 178 insertions, 0 deletions
diff --git a/doc/killall.1 b/doc/killall.1 new file mode 100644 index 0000000..3414066 --- /dev/null +++ b/doc/killall.1 @@ -0,0 +1,178 @@ +.\" +.\" Copyright 1993-2002 Werner Almesberger +.\" 2002-2023 Craig Small +.\" This program is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 2 of the License, or +.\" (at your option) any later version. +.\" +.TH KILLALL 1 "2023-06-17" "psmisc" "User Commands" +.SH NAME +killall \- kill processes by name +.SH SYNOPSIS +.ad l +.B killall +.RB [ \-Z , \ \-\-context +.IR pattern ] +.RB [ \-e , \ \-\-exact ] +.RB [ \-g , \ \-\-process\-group ] +.RB [ \-i , \ \-\-interactive ] +.RB [ \-n , \ \-\-ns +.IR PID ] +.RB [ \-o , \ \-\-older\-than +.IR TIME ] +.RB [ \-q , \ \-\-quiet ] +.RB [ \-r , \ \-\-regexp ] +.RB [ \-s , \ \-\-signal +.IR SIGNAL ,\ \fB\- \fISIGNAL\fR ] +.RB [ \-u , \ \-\-user +.IR user ] +.RB [ \-v , \ \-\-verbose ] +.RB [ \-w , \ \-\-wait ] +.RB [ \-y , \ \-\-younger\-than +.IR TIME ] +.RB [ \-I , \ \-\-ignore-case ] +.RB [ \-V , \ \-\-version ] +.RB [ \-\- ] +.IR name " ..." +.br +.B killall +.BR \-l ", " \-\-list +.br +.B killall +.BR \-V , \ \-\-version +.ad b +.SH DESCRIPTION +.B killall +sends a signal to all processes running any of the specified commands. +If no signal name is specified, SIGTERM is sent. +.PP +Signals can be specified either by name (e.g.\& +.B \-HUP +or +.BR \-SIGHUP ) +or by number (e.g.\& +.BR \-1 ) +or by option +.BR \-s . +.PP +If the command name is not regular expression (option +.BR \-r ) +and contains a slash +.RB ( / ), +processes executing that particular file will be selected for killing, +independent of their name. +.PP +.B killall +returns a zero return code if at least one process has been killed for +each listed command, or no commands were listed and at least one +process matched the \fB\-u\fR and \fB\-Z\fR search criteria. +.B killall +returns non-zero otherwise. +.PP +A +.B killall +process never kills itself (but may kill other +.B killall +processes). +.SH OPTIONS +.IP "\fB\-e\fP, \fB\-\-exact\fP" +Require an exact match for very long names. If a command name is +longer than 15 characters, the full name may be unavailable (i.e. it +is swapped out). In this case, +.B killall +will kill everything that matches within the first 15 characters. With +.BR \-e , +such entries are skipped. +.B killall +prints a message for each skipped entry +if +.B \-v +is specified in addition to +.BR \-e . +.IP "\fB\-I\fP, \fB\-\-ignore\-case\fP" +Do case insensitive process name match. +.IP "\fB\-g\fP, \fB\-\-process\-group\fP" +Kill the process group to which the process belongs. The kill signal +is only sent once per group, even if multiple processes belonging to +the same process group were found. +.IP "\fB\-i\fP, \fB\-\-interactive\fP" +Interactively ask for confirmation before killing. +.IP "\fB\-l\fP, \fB\-\-list\fP" +List all known signal names. +.IP "\fB\-n\fP, \fB\-\-ns\fP" +Match against the PID namespace of the given PID. The default is to match +against all namespaces. +.IP "\fB\-o\fP, \fB\-\-older\-than\fP" +Match only processes that are older (started before) the time +specified. The time is specified as a float then a unit. The units +are s,m,h,d,w,M,y for seconds, minutes, hours, days, weeks, months and +years respectively. +.IP "\fB\-q\fP, \fB\-\-quiet\fP" +Do not complain if no processes were killed. +.IP "\fB\-r\fP, \fB\-\-regexp\fP" +Interpret process name pattern as a POSIX extended regular expression, per +.BR regex (3). +.IP "\fB\-s\fP, \fB\-\-signal\fP, \fB\-\fISIGNAL\fP" +Send this signal instead of SIGTERM. +.IP "\fB\-u\fP, \fB\-\-user\fP" +Kill only processes the specified user owns. Command names are +optional. +.IP "\fB\-v\fP, \fB\-\-verbose\fP" +Report if the signal was successfully sent. +.IP "\fB\-V\fP, \fB\-\-version\fP" +Display version information. +.IP "\fB\-w\fP, \fB\-\-wait\fP" +Wait for all killed processes to die. +.B killall +checks once per second if any of the killed processes still exist and +only returns if none are left. Note that +.B killall +may wait forever if the signal was ignored, had no effect, or if the +process stays in zombie state. +.IP "\fB\-y\fP, \fB\-\-younger\-than\fP" +Match only processes that are younger (started after) the time +specified. The time is specified as a float then a unit. The units +are s,m,h,d,w,M,y for seconds, minutes, hours, days, weeks, Months and +years respectively. +.IP "\fB\-Z\fP, \fB\-\-context\fP" +Specify security context: kill only processes having +security context that match with given extended regular expression +pattern. Must precede other arguments on the command line. Command +names are optional. +.SH FILES +.TP +/proc +location of the proc file system +.SH "KNOWN BUGS" +Killing by file only works for executables that are kept open during +execution, i.e. impure executables can't be killed this way. +.PP +Be warned that typing +.B killall +.I name +may not have the desired effect on non-Linux systems, especially when +done by a privileged user. +.PP +.B killall \-w +doesn't detect if a process disappears and is replaced by a new process +with the same PID between scans. +.PP +If processes change their name, +.B killall +may not be able to match them correctly. +.PP +.B killall +has a limit of names that can be specified on the command line. This +figure is the size of an unsigned long integer multiplied by 8. For most 32 +bit systems the limit is 32 and similarly for a 64 bit system the limit +is usually 64. +.SH "SEE ALSO" +.BR kill (1), +.BR fuser (1), +.BR pgrep (1), +.BR pidof (1), +.BR pkill (1), +.BR ps (1), +.BR kill (2), +.BR regex (3). |