1 | .TH SERVICE 8
|
---|
2 | .SH NAME
|
---|
3 | service \- Start or stop an operating system server or device driver.
|
---|
4 | .SH SYNOPSIS
|
---|
5 | .PP
|
---|
6 | \fBservice up\fR \fI<service>\fR [\fB-args\fR \fIargs\fR]
|
---|
7 | [\fB-dev\fR \fIspecial\fR] [\fB-period\fR \fIticks\fR]
|
---|
8 | .PP
|
---|
9 | \fBservice down\fR \fI<pid>\fR
|
---|
10 | .PP
|
---|
11 | \fBservice refresh\fR \fI<pid>\fR
|
---|
12 | .PP
|
---|
13 | \fBservice rescue\fR \fI<dir>\fR
|
---|
14 | .PP
|
---|
15 | \fBservice shutdown\fR
|
---|
16 | .br
|
---|
17 | .de FL
|
---|
18 | .TP
|
---|
19 | \\fB\\$1\\fR
|
---|
20 | \\$2
|
---|
21 | ..
|
---|
22 | .de EX
|
---|
23 | .TP
|
---|
24 | \\fB\\$1\\fR
|
---|
25 | \\$2
|
---|
26 | ..
|
---|
27 | .SH DESCRIPTION
|
---|
28 | .PP
|
---|
29 | Tells the reincarnation server to start or stop a system service, such as a
|
---|
30 | server or device driver. The device driver will be automatically restarted when
|
---|
31 | it unexpectedly exits, e.g., if it is killed because of a bad pointer.
|
---|
32 | Starting requires an absoluate path to the binary to be executed.
|
---|
33 | .PP
|
---|
34 | When an optional period is specified, the reincarnation server sends a status
|
---|
35 | request to the system service after every period. If there the response does
|
---|
36 | not arrive in time, the reincarnation server will kill the misbehaving process
|
---|
37 | and restart a new one. The period must be specified in ticks, but can be
|
---|
38 | appended with 'HZ' to make it seconds.
|
---|
39 | .PP
|
---|
40 | Stopping a system service requires the process id of a running system service.
|
---|
41 | Issuing a kill command from the shell will not work, since the reincarnation
|
---|
42 | server interprets this as an unexpected exit and will automatically restart
|
---|
43 | a fresh copy of the process. The clean way to restart a process is using the
|
---|
44 | 'refresh' option of the service utility.
|
---|
45 | .PP
|
---|
46 | The rescue call can be used to set the current working directory of the reincarnation server. By using a trusted rescue driver to shadow certain binaries in RAM the reincarnation server can check that rescue directory for binaries if the normal execution of the absolute path fails. This allows recovery from failures of the root file system driver.
|
---|
47 | .PP
|
---|
48 | If the system is to be shutdown, the reincarnation server should know about this event to prevent it from restarting services that are killed during the shutdown
|
---|
49 | sequence.
|
---|
50 | .SH EXAMPLES
|
---|
51 | .EX "service up /sbin/is -period 5HZ" "Start the IS server and check its status every 5 seconds."
|
---|
52 | .br
|
---|
53 | .EX "service up /usr/sbin/dp8390 -args DPETH0=pci" "Start the DP8390 ethernet driver, passing one argument."
|
---|
54 | .br
|
---|
55 | .EX "service down 117" "Stop the system service with process id 117."
|
---|
56 | .br
|
---|
57 | .SH "SEE ALSO"
|
---|
58 | .PP
|
---|
59 | .BR boot (8),
|
---|
60 | .BR monitor (8)
|
---|
61 |
|
---|