minix/man/man8/service.8

54 lines
2.3 KiB
Groff
Raw Normal View History

.TH SERVICE 8
.SH NAME
2005-10-20 14:08:25 +02:00
service \- Start or stop an operating system server or device driver.
.SH SYNOPSIS
.PP
2005-10-20 14:08:25 +02:00
\fBservice up\fR \fI<service>\fR [\fB-args\fR \fIargs\fR]
[\fB-dev\fR \fIspecial\fR] [\fB-period\fR \fIticks\fR]
.PP
\fBservice down\fR \fI<pid>\fR
.PP
2005-10-20 22:19:25 +02:00
\fBservice refresh\fR \fI<pid>\fR
.PP
2005-10-21 15:28:26 +02:00
\fBservice rescue\fR \fI<dir>\fR
.PP
2005-10-20 14:08:25 +02:00
\fBservice shutdown\fR
.br
.de FL
.TP
\\fB\\$1\\fR
\\$2
..
.de EX
.TP
\\fB\\$1\\fR
\\$2
..
.SH DESCRIPTION
.PP
2005-10-20 14:08:25 +02:00
Tells the reincarnation server to start or stop a system service, such as a
server or device driver. The device driver will be automatically restarted when
it unexpectedly exits, e.g., if it is killed because of a bad pointer.
Starting requires an absoluate path to the binary to be executed.
.PP
When an optional period is specified, the reincarnation server sends a status request to the system service after every period. If there the response does not arrive in time, the reincarnation server will kill the misbehaving process and restart a new one. The period must be specified in ticks, but can be appended with HZ to make it seconds.
.PP
Stopping a system service requires the process id of a running system service. Issuing a kill command from the shell will not work, since the reincarnation server interprets this as an unexpected exit and will automatically restart a fresh copy of the process. The clean way to restart a process is using the refresh option of the service utility.
2005-10-20 14:08:25 +02:00
.PP
2005-10-21 15:28:26 +02:00
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.
.PP
2005-10-20 14:25:33 +02:00
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
2005-10-20 14:08:25 +02:00
sequence.
.SH EXAMPLES
2005-10-20 14:08:25 +02:00
.EX "service up /sbin/is -period 5HZ" "Start the IS server and check its status every 5 seconds."
.br
.EX "service up /usr/sbin/dp8390 -args DPETH0=pci" "Start the DP8390 ethernet driver, passing one argument."
.br
.EX "service down 117" "Stop the system service with process id 117."
.br
.SH "SEE ALSO"
.PP
.BR boot (8),
.BR monitor (8)