the djb way

daemontools


cut 'n' save: a svc reference card

Pilots of djb servers will use the daemontools svc utility as the central control command for all services running on their hosts.

Getting to know svc, and using it with as much ease and proficiency as ls or grep, is a key aptitude to acquire as quickly as possible. Here is a summary that may help while you are learning.

command mnemonic signal action
svc -u up   bring service up
svc -d down   put service down (stays down)
svc -o once   run service once (don't restart)
svc -x exit   exit supervise after service is down
svc -a alarm SIGALRM send service ALRM signal
svc -c continue SIGCONT send service CONT signal
svc -h "hup", hang-up SIGHUP send service HUP signal
svc -i interrupt SIGINT send service INT signal
svc -k kill SIGKILL send service KILL signal
svc -p pause SIGSTOP send service STOP signal
svc -t terminate SIGTERM send service TERM signal
svc -q quit SIGQUIT send service QUIT signal
svc -1 user 1 SIGUSR1 send service USR1 signal
svc -2 user 2 SIGUSR2 send service USR2 signal

Notes:

some application-specific examples

Manually run the qmail queue:

# svc -a /service/qmail-qsend

Reload the locals and virtualdomains control files used by qmail-send:

# svc -h /service/qmail-qsend

"Wake-up" a fetchmail service for an immediate poll:

# svc -1 /service/fetchmail

Toggle debug output on a mathopd service:

# svc -q /service/mathopd

Set a ppp service down by default, and run it once:

# touch /service/ppp/down
# svc -o /service/ppp

Copyright © 2004 - 2007 Wayne Marshall.
All rights reserved.

Last edit 2007.12.27, wcm.