supervise

## Name

supervise — starts and monitors a service.

## Synopsis

`supervise` `s`

## Description

supervise switches to the directory named ``s`` and starts `./run`. It restarts `./run` if `./run` exits. It pauses for a second after starting `./run`, so that it does not loop too quickly if `./run` exits immediately.

If the file ``s`/down` exists, supervise does not start `./run` immediately. You can use svc(1) to start `./run` and to give other commands to supervise.

supervise maintains status information in a binary format inside the directory ``s`/supervise`, which must be writable to supervise. The status information can be read by svstat(1).

supervise may exit immediately after startup if it cannot find the files it needs in ``s`` or if another copy of supervise is already running in ``s``. Once supervise is successfully running, it will not exit unless it is killed or specifically asked to exit. You can use svok(1) to check whether supervise is successfully running. You can use svscan(1) to reliably start a collection of supervise processes.

## See also

svc(1)
svok(1)
svstat(1)
svscanboot(1)
svscan(1)
readproctitle(1)
fghack(1)
pgrphack(1)
multilog(1)
tai64n(1)
tai64nlocal(1)
setuidgid(1)
envuidgid(1)
envdir(1)
softlimit(1)
setlock(1)

## Author

Original code and documentation by Daniel J. Bernstein. Converted to manual pages and updated by Gerrit Pape in 2000, 2001, and 2002. Converted to DocBook XML by Jonathan de Boyne Pollard.