]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - 6/usr.bin/killall/killall.1
merge fix for boot-time hang on centos' xen
[FreeBSD/FreeBSD.git] / 6 / usr.bin / killall / killall.1
1 .\" Copyright (C) 1995 by Joerg Wunsch, Dresden
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
14 .\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16 .\" DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
17 .\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18 .\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19 .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21 .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22 .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23 .\" POSSIBILITY OF SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD$
26 .\"
27 .Dd January 26, 2004
28 .Os
29 .Dt KILLALL 1
30 .Sh NAME
31 .Nm killall
32 .Nd kill processes by name
33 .Sh SYNOPSIS
34 .Nm
35 .Op Fl delmsvz
36 .Op Fl help
37 .Op Fl j Ar jid
38 .Op Fl u Ar user
39 .Op Fl t Ar tty
40 .Op Fl c Ar procname
41 .Op Fl SIGNAL
42 .Op Ar procname ...
43 .Sh DESCRIPTION
44 The
45 .Nm
46 utility kills processes selected by name, as opposed to the selection by pid
47 as done by
48 .Xr kill 1 .
49 By default, it will send a
50 .Dv TERM
51 signal to all processes with a real UID identical to the
52 caller of
53 .Nm
54 that match the name
55 .Ar procname .
56 The super-user is allowed to kill any process.
57 .Pp
58 The options are as follows:
59 .Bl -tag -width 10n -offset indent
60 .It Fl d | v
61 Be more verbose about what will be done.
62 For a single
63 .Fl d
64 option, a list of the processes that will be sent the signal will be
65 printed, or a message indicating that no matching processes have been
66 found.
67 .It Fl e
68 Use the effective user ID instead of the (default) real user ID for matching
69 processes specified with the
70 .Fl u
71 option.
72 .It Fl help
73 Give a help on the command usage and exit.
74 .It Fl l
75 List the names of the available signals and exit, like in
76 .Xr kill 1 .
77 .It Fl m
78 Match the argument
79 .Ar procname
80 as a (case sensitive) regular expression against the names
81 of processes found.
82 CAUTION!
83 This is dangerous, a single dot will match any process
84 running under the real UID of the caller.
85 .It Fl s
86 Show only what would be done, but do not send any signal.
87 .It Fl SIGNAL
88 Send a different signal instead of the default
89 .Dv TERM .
90 The signal may be specified either as a name
91 (with or without a leading
92 .Dv SIG ) ,
93 or numerically.
94 .It Fl j Ar jid
95 Kill processes in the jail specified by
96 .Ar jid .
97 .It Fl u Ar user
98 Limit potentially matching processes to those belonging to
99 the specified
100 .Ar user .
101 .It Fl t Ar tty
102 Limit potentially matching processes to those running on
103 the specified
104 .Ar tty .
105 .It Fl c Ar procname
106 When used with the
107 .Fl u
108 or
109 .Fl t
110 flags, limit potentially matching processes to those matching
111 the specified
112 .Ar procname .
113 .It Fl z
114 Do not skip zombies.
115 This should not have any effect except to print a few error messages
116 if there are zombie processes that match the specified pattern.
117 .El
118 .Sh ALL PROCESSES
119 Sending a signal to all processes with uid
120 .Em XYZ
121 is already supported by
122 .Xr kill 1 .
123 So use
124 .Xr kill 1
125 for this job (e.g.\& $ kill -TERM -1 or
126 as root $ echo kill -TERM -1 | su -m <user>)
127 .Sh EXIT STATUS
128 The
129 .Nm
130 command will respond with a short usage message and exit with a status
131 of 2 in case of a command error.
132 A status of 1 will be returned if
133 either no matching process has been found or not all processes have
134 been signalled successfully.
135 Otherwise, a status of 0 will be
136 returned.
137 .Sh DIAGNOSTICS
138 Diagnostic messages will only be printed if requested by
139 .Fl d
140 options.
141 .Sh SEE ALSO
142 .Xr kill 1 ,
143 .Xr pkill 1 ,
144 .Xr sysctl 3 ,
145 .Xr jail 8
146 .Sh HISTORY
147 The
148 .Nm
149 command appeared in
150 .Fx 2.1 .
151 It has been modeled after the
152 .Nm
153 command as available on other platforms.
154 .Sh AUTHORS
155 .An -nosplit
156 The
157 .Nm
158 program was originally written in Perl and was contributed by
159 .An Wolfram Schneider ,
160 this manual page has been written by
161 .An J\(:org Wunsch .
162 The current version of
163 .Nm
164 was rewritten in C by
165 .An Peter Wemm
166 using
167 .Xr sysctl 3 .