1 .TH PIDOF 8 "01 Sep 1998" "" "Linux System Administrator's Manual"
3 pidof -- find the process ID of a running program.
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
23 (8) program that should be used instead.
26 Single shot - this instructs the program to only return one \fIpid\fP.
28 Scripts too - this causes the program to also return process id's of
29 shells running the named scripts.
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.
35 \fIpidof\fP is simply a (symbolic) link to the \fIkillall5\fP program,
36 which should also be located in \fP/sbin\fP.
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.
48 Miquel van Smoorenburg, miquels@cistron.nl