1PIDOF(8)              Linux System Administrator's Manual             PIDOF(8)
2
3
4

NAME

6       pidof -- find the process ID of a running program.
7

SYNOPSIS

9       pidof [-s] [-c] [-x] [-o omitpid] [-o omitpid..]  program [program..]
10

DESCRIPTION

12       Pidof  finds  the  process id's (pids) of the named programs. It prints
13       those id's on the standard output. This program is on some systems used
14       in  run-level change scripts, especially when the system has a System-V
15       like  rc  structure.  In  that  case  these  scripts  are  located   in
16       /etc/rc?.d,  where  ?  is the runlevel. If the system has a start-stop-
17       daemon (8) program that should be used instead.
18

OPTIONS

20       -s     Single shot - this instructs the program to only return one pid.
21
22       -c     Only return process ids that are  running  with  the  same  root
23              directory.   This  option is ignored for non-root users, as they
24              will be unable to check the current root directory of  processes
25              they do not own.
26
27       -x     Scripts  too  -  this  causes the program to also return process
28              id's of shells running the named scripts.
29
30       -o     Tells pidof to omit processes with that process id. The  special
31              pid  %PPID  can  be used to name the parent process of the pidof
32              program, in other words the calling shell or shell script.
33

NOTES

35       pidof is simply a (symbolic) link to the killall5 program, which should
36       also be located in /sbin.
37
38       When  pidof  is  invoked  with a full pathname to the program it should
39       find the pid of, it is reasonably safe. Otherwise it is  possible  that
40       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

SEE ALSO

44       shutdown(8), init(8), halt(8), reboot(8)
45

AUTHOR

47       Miquel van Smoorenburg, miquels@cistron.nl
48
49
50
51                                  01 Sep 1998                         PIDOF(8)
Impressum