about summary refs log tree commit diff
CATSITD(8) System Manager's Manual CATSITD(8)

catsitdprocess supervisor

catsitd [-d] [-C path] [-c control] [-f config] [-g group] [-p pidfile] [-r reset] [-s stopexits] [-t restart] [-u user]

The catsitd daemon is a process supervisor for FreeBSD and OpenBSD. It is designed to supervise processes with the following behavior:
  1. The process runs in the foreground, not as a daemon.
  2. The process logs to standard output or standard error.
  3. The process handles errors by exiting and expects to be restarted.
  4. The process indicates its reason for exiting with sysexits(3).

The catsitd daemon spawns processes for a list of , redirects their output to syslog, and restarts the processes when they exit according to their exit status. Exponential backoff is applied to automatic restarts.

The list of services is defined in a catsit.conf(5) file. The services managed by catsitd can be controlled through a named pipe. The catsit(8) utility is a wrapper for writing to the named pipe, and its manual page describes the control command syntax.

The arguments are as follows:

Change directory to path before starting services. By default the working directory is /.
Set the path of the named pipe used for service control.
Do not run as a daemon. Log to standard error as well as syslog.
Set the path of the catsit.conf(5) file.
Change group to group before starting services. If -u is set, the default group is the user's group.
Write the PID of the catsitd process to pidfile.
Set the interval in milliseconds for which a process must live to have its service restart interval reset to the initial value. The default interval is 15 minutes.
Set the list of exit statuses for which a restart will not be attempted. The stopexits argument is a comma-separated list of integers. The default list contains the values of EX_USAGE, EX_DATAERR, EX_NOINPUT, EX_OSFILE and EX_CANTCREAT defined in sysexits(3). The exit statuses 126 and 127 are always treated as stop exits.
Set the initial interval in milliseconds between automatic restarts. This interval is doubled each time a service is automatically restarted. The default interval is 1 second.
Change user to user before starting services. Services which are are started without changing user. The catsit.conf(5) manual page describes privileged services.

The catsitd daemon takes the following actions in response to signals:

The catsit.conf(5) file is reloaded. Services are not automatically started, stopped or restarted. Removed services can be dropped with catsit(8).
The named pipe used for service control is closed and unlinked. All services are stopped, after which catsitd exits.
The current status of all services is logged.

Services are started with empty environments apart from the following:

Set to the name of the user specified by -u.
Set to the home directory of the user specified by -u.
Set to /bin/sh.
Set to the system default defined by _PATH_DEFPATH in <paths.h>.

The default path of the catsit.conf(5) file on FreeBSD.
The default path of the catsit.conf(5) file on OpenBSD.
The default path of the named pipe used for service control.

catsit.conf(5), catsit(8)

June McEnroe <june@causal.agency>

August 16, 2020 OpenBSD 7.4