Name

service-is-up, svup — daemontools compatibility service state checker

Synopsis

service-is-up {directory}

svup {directory}

Description

service-is-up checks to see whether a service is currently up and running. directory is either a supervise directory or a daemontools-style service directory with a supervise directory named supervise within it.

A service is considered up and running if its supervise directory contains an ok FIFO that can be opened for write in non-blocking mode, and contains a status file that indicates that the service is both up and running.

service-is-up understands the extended status file structure employed by service-manager(1) and daemontools-encore, and in the presence of extended status information will only consider a service to be up and running if it both has a non-zero process ID and is marked as in the running state. If there is only daemontools-style status information available, a service is considered up and running simply if it has a non-zero process ID.

The result is signalled by the exit code, which is 0 upon success, 111 if the directory does not exist or some other error occurred, and 100 if the status file says that the service is not up and running or the ok FIFO cannot be opened in client mode.

For more on service and supervise directories, see service-manager(1).

COMPATIBILITY

For daemontools-encore compatibility, this command is also available as svup.

Author

Jonathan de Boyne Pollard