work work werk
[mikesnafu-overlay.git] / sysvinit-2.86 / man / pidof.8
blob28b7cbd764a2ef29272eede35bde0851da522952
1 .TH PIDOF 8 "01 Sep 1998" "" "Linux System Administrator's Manual"
2 .SH NAME
3 pidof -- find the process ID of a running program.
4 .SH SYNOPSIS
5 .B pidof
6 .RB [ \-s ]
7 .RB [ \-x ]
8 .RB [ \-o
9 .IR omitpid ]
10 .RB [ \-o
11 .IR omitpid.. ]
12 .B program
13 .RB [ program.. ]
14 .SH DESCRIPTION
15 .B Pidof
16 finds the process id's (pids) of the named programs. It prints those
17 id's on the standard output. This program is on some systems used in
18 run-level change scripts, especially when the system has a
19 \fISystem-V\fP like \fIrc\fP structure. In that case these scripts are
20 located in /etc/rc?.d, where ? is the runlevel. If the system has
22 .B start-stop-daemon
23 (8) program that should be used instead.
24 .SH OPTIONS
25 .IP -s
26 Single shot - this instructs the program to only return one \fIpid\fP.
27 .IP -x
28 Scripts too - this causes the program to also return process id's of
29 shells running the named scripts.
30 .IP -o \fIomitpid\fP
31 Tells \fIpidof\fP to omit processes with that process id. The special
32 pid \fB%PPID\fP can be used to name the parent process of the \fIpidof\fP
33 program, in other words the calling shell or shell script.
34 .SH NOTES
35 \fIpidof\fP is simply a (symbolic) link to the \fIkillall5\fP program,
36 which should also be located in \fP/sbin\fP.
37 .PP
38 When \fIpidof\fP is invoked with a full pathname to the program it
39 should find the pid of, it is reasonably safe. Otherwise it is possible
40 that it returns pids of running programs that happen to have the same name
41 as the program you're after but are actually other programs.
42 .SH SEE ALSO
43 .BR shutdown (8),
44 .BR init (8),
45 .BR halt (8),
46 .BR reboot (8)
47 .SH AUTHOR
48 Miquel van Smoorenburg, miquels@cistron.nl