1995-06-25 18:08:27 +00:00
|
|
|
.\" Copyright (C) 1995 by Joerg Wunsch, Dresden
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
|
|
|
|
.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
|
|
|
|
.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
|
|
.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
|
|
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
|
|
|
.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
1999-08-28 01:08:13 +00:00
|
|
|
.\" $FreeBSD$
|
1995-06-25 18:08:27 +00:00
|
|
|
.\"
|
2012-06-27 00:50:25 +00:00
|
|
|
.Dd June 27, 2012
|
1995-06-25 18:08:27 +00:00
|
|
|
.Dt KILLALL 1
|
2010-04-14 19:08:06 +00:00
|
|
|
.Os
|
1995-06-25 18:08:27 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm killall
|
|
|
|
.Nd kill processes by name
|
|
|
|
.Sh SYNOPSIS
|
2000-11-20 19:21:22 +00:00
|
|
|
.Nm
|
2004-01-26 11:11:36 +00:00
|
|
|
.Op Fl delmsvz
|
1995-06-25 18:08:27 +00:00
|
|
|
.Op Fl help
|
2012-06-27 00:50:25 +00:00
|
|
|
.Op Fl I
|
2009-05-27 14:30:26 +00:00
|
|
|
.Op Fl j Ar jail
|
2000-08-28 22:09:38 +00:00
|
|
|
.Op Fl u Ar user
|
|
|
|
.Op Fl t Ar tty
|
|
|
|
.Op Fl c Ar procname
|
2007-11-09 16:02:10 +00:00
|
|
|
.Op Fl Ar SIGNAL
|
2000-08-28 22:09:38 +00:00
|
|
|
.Op Ar procname ...
|
1995-06-25 18:08:27 +00:00
|
|
|
.Sh DESCRIPTION
|
2002-04-20 12:18:28 +00:00
|
|
|
The
|
|
|
|
.Nm
|
2007-11-09 16:02:10 +00:00
|
|
|
utility kills processes selected by name, as opposed to the selection by PID
|
1995-06-25 18:08:27 +00:00
|
|
|
as done by
|
|
|
|
.Xr kill 1 .
|
|
|
|
By default, it will send a
|
|
|
|
.Dv TERM
|
2001-11-30 00:30:28 +00:00
|
|
|
signal to all processes with a real UID identical to the
|
1995-06-25 18:08:27 +00:00
|
|
|
caller of
|
|
|
|
.Nm
|
|
|
|
that match the name
|
|
|
|
.Ar procname .
|
|
|
|
The super-user is allowed to kill any process.
|
|
|
|
.Pp
|
|
|
|
The options are as follows:
|
2007-11-09 16:02:10 +00:00
|
|
|
.Bl -tag -width ".Fl c Ar procname"
|
2000-12-19 16:00:12 +00:00
|
|
|
.It Fl d | v
|
2004-07-02 22:22:35 +00:00
|
|
|
Be more verbose about what will be done.
|
|
|
|
For a single
|
1995-06-25 18:08:27 +00:00
|
|
|
.Fl d
|
|
|
|
option, a list of the processes that will be sent the signal will be
|
|
|
|
printed, or a message indicating that no matching processes have been
|
2000-08-28 22:09:38 +00:00
|
|
|
found.
|
2004-01-26 11:11:36 +00:00
|
|
|
.It Fl e
|
2004-05-18 20:45:32 +00:00
|
|
|
Use the effective user ID instead of the (default) real user ID for matching
|
2004-01-26 11:11:36 +00:00
|
|
|
processes specified with the
|
|
|
|
.Fl u
|
|
|
|
option.
|
1995-06-25 18:08:27 +00:00
|
|
|
.It Fl help
|
|
|
|
Give a help on the command usage and exit.
|
2012-06-27 00:50:25 +00:00
|
|
|
.It Fl I
|
|
|
|
Request confirmation before attempting to signal each
|
|
|
|
process.
|
1995-06-25 18:08:27 +00:00
|
|
|
.It Fl l
|
|
|
|
List the names of the available signals and exit, like in
|
|
|
|
.Xr kill 1 .
|
|
|
|
.It Fl m
|
|
|
|
Match the argument
|
|
|
|
.Ar procname
|
2004-01-18 17:51:34 +00:00
|
|
|
as a (case sensitive) regular expression against the names
|
2000-08-28 22:09:38 +00:00
|
|
|
of processes found.
|
2004-07-02 22:22:35 +00:00
|
|
|
CAUTION!
|
|
|
|
This is dangerous, a single dot will match any process
|
2001-11-30 00:30:28 +00:00
|
|
|
running under the real UID of the caller.
|
1995-06-25 18:08:27 +00:00
|
|
|
.It Fl s
|
1997-11-01 15:06:40 +00:00
|
|
|
Show only what would be done, but do not send any signal.
|
2007-11-09 16:02:10 +00:00
|
|
|
.It Fl Ar SIGNAL
|
1995-06-25 18:08:27 +00:00
|
|
|
Send a different signal instead of the default
|
|
|
|
.Dv TERM .
|
|
|
|
The signal may be specified either as a name
|
2001-08-07 15:48:51 +00:00
|
|
|
(with or without a leading
|
2007-11-09 16:02:10 +00:00
|
|
|
.Dq Li SIG ) ,
|
1995-06-25 18:08:27 +00:00
|
|
|
or numerically.
|
2009-05-27 14:30:26 +00:00
|
|
|
.It Fl j Ar jail
|
|
|
|
Kill processes in the specified
|
|
|
|
.Ar jail .
|
2000-08-28 22:09:38 +00:00
|
|
|
.It Fl u Ar user
|
|
|
|
Limit potentially matching processes to those belonging to
|
|
|
|
the specified
|
|
|
|
.Ar user .
|
2001-01-21 01:07:26 +00:00
|
|
|
.It Fl t Ar tty
|
2001-07-15 08:06:20 +00:00
|
|
|
Limit potentially matching processes to those running on
|
2000-08-28 22:09:38 +00:00
|
|
|
the specified
|
|
|
|
.Ar tty .
|
|
|
|
.It Fl c Ar procname
|
2007-11-09 16:02:10 +00:00
|
|
|
Limit potentially matching processes to those matching
|
2000-08-28 22:09:38 +00:00
|
|
|
the specified
|
2002-07-15 11:33:30 +00:00
|
|
|
.Ar procname .
|
2002-04-14 22:25:57 +00:00
|
|
|
.It Fl z
|
2002-05-29 18:53:22 +00:00
|
|
|
Do not skip zombies.
|
2002-04-14 22:25:57 +00:00
|
|
|
This should not have any effect except to print a few error messages
|
|
|
|
if there are zombie processes that match the specified pattern.
|
1995-06-25 18:08:27 +00:00
|
|
|
.El
|
1996-02-03 22:52:27 +00:00
|
|
|
.Sh ALL PROCESSES
|
2007-11-09 16:31:47 +00:00
|
|
|
Sending a signal to all processes with the given UID
|
1996-02-03 22:52:27 +00:00
|
|
|
is already supported by
|
2001-07-15 08:06:20 +00:00
|
|
|
.Xr kill 1 .
|
|
|
|
So use
|
1996-02-03 22:52:27 +00:00
|
|
|
.Xr kill 1
|
2007-11-09 16:02:10 +00:00
|
|
|
for this job (e.g.\&
|
2012-03-26 15:18:14 +00:00
|
|
|
.Dq Li "kill -TERM -1"
|
2007-11-09 16:02:10 +00:00
|
|
|
or as root
|
|
|
|
.Dq Li "echo kill -TERM -1 | su -m <user>" ) .
|
2010-05-13 12:08:11 +00:00
|
|
|
.Sh IMPLEMENTATION NOTES
|
|
|
|
This
|
|
|
|
.Fx
|
|
|
|
implementation of
|
|
|
|
.Nm
|
|
|
|
has completely different semantics as compared to the traditional
|
|
|
|
.Ux
|
|
|
|
System V behavior of
|
|
|
|
.Nm .
|
|
|
|
The latter will kill all processes that the current user is able to
|
|
|
|
kill, and is intended to be used by the system shutdown process only.
|
2005-01-17 07:44:44 +00:00
|
|
|
.Sh EXIT STATUS
|
1995-06-25 18:08:27 +00:00
|
|
|
The
|
|
|
|
.Nm
|
2007-11-09 16:02:10 +00:00
|
|
|
utility exits 0 if some processes have been found and
|
|
|
|
signalled successfully.
|
|
|
|
Otherwise, a status of 1 will be
|
1995-06-25 18:08:27 +00:00
|
|
|
returned.
|
2005-01-17 07:44:44 +00:00
|
|
|
.Sh DIAGNOSTICS
|
1995-06-25 18:08:27 +00:00
|
|
|
Diagnostic messages will only be printed if requested by
|
|
|
|
.Fl d
|
|
|
|
options.
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr kill 1 ,
|
2004-03-27 23:45:33 +00:00
|
|
|
.Xr pkill 1 ,
|
2003-04-09 03:04:12 +00:00
|
|
|
.Xr sysctl 3 ,
|
|
|
|
.Xr jail 8
|
1995-06-25 18:08:27 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
1996-08-23 00:57:08 +00:00
|
|
|
command appeared in
|
|
|
|
.Fx 2.1 .
|
|
|
|
It has been modeled after the
|
1995-06-25 18:08:27 +00:00
|
|
|
.Nm
|
|
|
|
command as available on other platforms.
|
1998-03-23 07:48:45 +00:00
|
|
|
.Sh AUTHORS
|
2000-11-22 09:35:58 +00:00
|
|
|
.An -nosplit
|
2000-08-28 22:09:38 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
program was originally written in Perl and was contributed by
|
1998-03-23 07:48:45 +00:00
|
|
|
.An Wolfram Schneider ,
|
|
|
|
this manual page has been written by
|
2000-11-10 17:46:15 +00:00
|
|
|
.An J\(:org Wunsch .
|
2000-08-28 22:09:38 +00:00
|
|
|
The current version of
|
|
|
|
.Nm
|
2000-11-10 17:46:15 +00:00
|
|
|
was rewritten in C by
|
|
|
|
.An Peter Wemm
|
|
|
|
using
|
2000-08-28 22:09:38 +00:00
|
|
|
.Xr sysctl 3 .
|