version 1, including all changes.
.
| Rev |
Author |
# |
Line |
| 1 |
perry |
1 |
PIDOF |
| |
|
2 |
!!!PIDOF |
| |
|
3 |
NAME |
| |
|
4 |
SYNOPSIS |
| |
|
5 |
DESCRIPTION |
| |
|
6 |
OPTIONS |
| |
|
7 |
NOTES |
| |
|
8 |
SEE ALSO |
| |
|
9 |
AUTHOR |
| |
|
10 |
---- |
| |
|
11 |
!!NAME |
| |
|
12 |
|
| |
|
13 |
|
| |
|
14 |
pidof -- find the process ID of a running program. |
| |
|
15 |
!!SYNOPSIS |
| |
|
16 |
|
| |
|
17 |
|
| |
|
18 |
__pidof__ [[__-s__] [[__-x__] [[__-o__ |
| |
|
19 |
''omitpid''] [[__-o__ ''omitpid..''] __program__ |
| |
|
20 |
[[__program..__] |
| |
|
21 |
!!DESCRIPTION |
| |
|
22 |
|
| |
|
23 |
|
| |
|
24 |
__Pidof__ finds the process id's (pids) of the named |
| |
|
25 |
programs. It prints those id's on the standard output. This |
| |
|
26 |
program is on some systems used in run-level change scripts, |
| |
|
27 |
especially when the system has a ''System-V'' like |
| |
|
28 |
''rc'' structure. In that case these scripts are located |
| |
|
29 |
in /etc/rc?.d, where ? is the runlevel. If the system has a |
| |
|
30 |
__start-stop-daemon__ (8) program that should be used |
| |
|
31 |
instead. |
| |
|
32 |
!!OPTIONS |
| |
|
33 |
|
| |
|
34 |
|
| |
|
35 |
-s |
| |
|
36 |
|
| |
|
37 |
|
| |
|
38 |
Single shot - this instructs the program to only return one |
| |
|
39 |
''pid''. |
| |
|
40 |
|
| |
|
41 |
|
| |
|
42 |
-x |
| |
|
43 |
|
| |
|
44 |
|
| |
|
45 |
Scripts too - this causes the program to also return process |
| |
|
46 |
id's of shells running the named scripts. |
| |
|
47 |
|
| |
|
48 |
|
| |
|
49 |
-o |
| |
|
50 |
|
| |
|
51 |
|
| |
|
52 |
Tells ''pidof'' to omit processes with that process id. |
| |
|
53 |
The special pid __%PPID__ can be used to name the parent |
| |
|
54 |
process of the ''pidof'' program, in other words the |
| |
|
55 |
calling shell or shell script. |
| |
|
56 |
!!NOTES |
| |
|
57 |
|
| |
|
58 |
|
| |
|
59 |
''pidof'' is simply a (symbolic) link to the |
| |
|
60 |
''killall5'' program, which should also be located in |
| |
|
61 |
''/sbin''. |
| |
|
62 |
|
| |
|
63 |
|
| |
|
64 |
When ''pidof'' is invoked with a full pathname to the |
| |
|
65 |
program it should find the pid of, it is reasonably safe. |
| |
|
66 |
Otherwise it is possible that it returns pids of running |
| |
|
67 |
programs that happen to have the same name as the program |
| |
|
68 |
you're after but are actually other programs. |
| |
|
69 |
!!SEE ALSO |
| |
|
70 |
|
| |
|
71 |
|
| |
|
72 |
shutdown(8), init(8), halt(8), |
| |
|
73 |
reboot(8) |
| |
|
74 |
!!AUTHOR |
| |
|
75 |
|
| |
|
76 |
|
| |
|
77 |
Miquel van Smoorenburg, miquels@cistron.nl |
| |
|
78 |
---- |