File: pidof.8

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