FSCD(8)

NAME
fscd - service state monitoring daemon

SYNOPSIS
fscd [-Vvf] [-s socket] [-c file]

DESCRIPTION
fscd ( FreeBSD service control daemon) is a daemon which monitors states of services and restarts them if they die.

When invoked, the fscd utility will check for services listed in its configuration file and create a socket to listen for messages from fscadm(8), ( FreeBSD services control administration utility), the control program for fscd.

When monitored services terminate, they will be restarted, and a notification will be logged to the LOG_ERR facility. If fscd is unable to successfully start a service, it will be removed and a log message will be issued.

fscd uses the kqueue(2) interface to be notified about process terminations and rc(8), resp. service(8) for (re)starting services, getting their pids and initially checking their status.

fscd is subject the same rules which govern rc(8); meaning that services must have an entry in rc.conf(5) before they may be handled through this interface. After successfully becoming a daemon, services may be added using the fscadm(8) utility.

  SIGNALS
Several signals don't restart the service immediately as they may be the result of the user restarting it by hand. Instead, fscd will wait up to 60 seconds for the service to restart. These are:
-   SIGINT
-   SIGTERM
-   SIGUSR1
-   SIGUSR2
-   SIGKILL

OPTIONS

-V  Print out the version of fscd and exit.

-v  Verbose, don't fork to background and don't log to syslog(3) but to console.

-f  Force, if the socket already exists, delete it. This can occur if fscd is already running or was not properly shut down before.

-s socket
    Use socket socket instead of the standard socket /var/run/fscd.sock.

-c file
    Use file file as configuration file instead of the standard file /etc/fscd.conf.

FILES
/var/run/fscd.sock
    name of the UNIX domain socket
/etc/fscd.conf
    name of the configuration file

SEE ALSO
kqueue(2), signal(3), syslog(3), fscd.conf(5), rc.conf(5), fscadm(8), rc(8), rcorder(8), service(8), syslog(8)

HISTORY
fscd utility first appeared in FreeBSD 10.0 as part of the FreeBSD service control utilities.

AUTHORS
The fsc utilities and documentation were written by Tom Rhodes <trhodes@FreeBSD.org>.

BUGS
The fscd utility may fail to start a service if the parent died with a SIGKILL and children, with unique PIDs are not subsequently killed off. Such cases usally leave resources, such as port numbers or pidfiles around which confuse service(8). This behavior has been observed on several operating systems and should possibly be fixed by the software in question.