Skip to content

svstat.8

Manvendra Bhangui edited this page Apr 13, 2026 · 6 revisions

NAME

svstat - print status of services monitored by supervise(8).

SYNOPSIS

svstat services

DESCRIPTION

services consists of any number of arguments, each argument naming a directory. svstat prints one human-readable line for each directory, saying whether supervise(8) is successfully running in that directory, and reporting the status and process information maintained by supervise. The information printed is the status and pid. The status is one of up, down or wait. In case the service status is up, pid is the process id of the service. In case the status is either down or wait, pid will be the process id of the supervise process.

When supervise is monitoring a process that forks in the background, the pid that is shown may be actually no longer exist. In such a case svstat will show pid label as '?pid'. As stated in the supervise man page, you can have supervise monitor such errant processes by using fghack(8) or by having sticky bit on the run file.

# this service is up. here the pid of qmail-qmtpd is 762703
$ svstat /service/qmail-qmtpd.209
/service/qmail-qmtpd.209: up 64849.402144999 seconds pid 762703

# this service is down. here the pid of supervise is 762596
$ svstat /service/qmail-qmqpd.628
/service/qmail-qmqpd.628: down 3453.701675999 seconds spid 762596

# this service is waiting for a dependent service to be up
# It has been waiting for the past 96 seconds. The pid
# 762630 is the pid of the supervise process
$ svstat /service/inlookup.infifo
/service/inlookup.infifo: wait 96.530758999 seconds spid 762630

# this service has already waited 3.28 seconds since a dependent
# service came up. It will further wait for 7 seconds. The pid
# 762630 is the pid of the supervise process
$ svstat /service/inlookup.infifo
/service/inlookup.infifo: wait 3.285475999 seconds spid 762630 remaining 7 seconds

If the argument to svscan names just one directory, then the return value will reflect various status of a service as below

	 111 - system error
	 100 - bad status
	   0 - service running
	   1 - service down
	   2 - supervise not running
	   3 - service paused
	   4 - down - wants up
	   5 - up   - wants down
	   6 - wait - wating for service to come up

SEE ALSO

supervise(8), svps(1), svc(8), svok(8), svwait(8) svscan(8), svctool(8), minisvc(8), svscanboot(8), readproctitle(8), fghack(8), pgrphack(8), multilog(8), tai64n(8), tai64nlocal(8), setuidgid(8), envuidgid(8), envdir(8), softlimit(8), setlock(8), http://cr.yp.to/daemontools.html

Clone this wiki locally