daemontoolsx
From daemontools to daemontoolsx
Long before Lennart Poettering raised Pid one aka systemd, there where several attempts to provide a more elegant and versatile management for long-running processes (so-called daemons) on Unix. Some of you may remember:
Prior of the last both, Dan Bernstein created his daemontools package in 1999 including some of his other tools for logging and time-stamping but it was not forseen as a substitude for the Unix PID 1. While in Linux the /proc filesystem is acting as a user-space replica of the processes and their attributes under control of the Unix kernel, with daemontools the directory /service is tailored to host start scripts and management capabilities for daemons including their logging. Logging is required for any type of Internet services.
The initial qmail was released in 1995 with the assumption to run under inittab or by means of System V's rc scripts, the later djbdns used the daemontools facility to a large extend and installation was based on it. This still happens given a primitive init or PID 1 initial user space process.
The daemontools were adopted by
- Bruce Guenter as daemontools-encore and
- Gerrit Pape as runit but now with the additional feature to be a replacement for init the Unix Pid 1 process. runit can be used by Artix Linux (what I use on my notebook) as init system.
- Laurent Bercot's s6 tools are also inspired by the daemontools.
Initially, I did not see the requirement to complement those excellent working software packages by an own fork, but given the original daemontools, one important feature is missing, which is particularily present in systemd: Process dependencies on start. This was the trigger for daemontoolsx.
Features of daemontoolsx
- daemontoolsx comes in the common /slashpackage format for easy installation.
- daemontoolsx's installation directory and the service directory can be chosen on install.
- daemontoolsx is now based upon my fehQlibs-31 with buffer_gets() enhancement.
- daemontoolsx complies to modern C standards and works out-of-box on a variety of Unix systems without further dependencies.
- daemontoolsx allows process chaining: The start of a daemontoolsx process may be delayed until a dependent process is up and running; even outside deamontoolsx's realm.
- daemontoolsx picks up Bruce Guenter's idea to enable buffered writing for multilog, reducing system calls and thus improving efficiency on a busy Unix system for log file handling.
Apart from those changes, daemontoolsx is '1:1' feature and API identical to the daemontools. Unless you need the above features, you can stay with the orginal daemontools package or any of the others.
Sources
| Version & Download | Description | fehQlibs version | Verification |
|---|---|---|---|
| daemontoolsx-1.06 | The first release of daemontoolsx based on daemontools 0.76. | fehQlibs-31 | MD5: dfe6daf8e1962da350d6f34e7df2a911 Build: 20260531112543 |
daemontoolsx's source files are documented in doxygen.
Documentation
The included documentation for daemontoolsx is still brief:
Based on my Qmail book from 2002, I've prepared a daemontools 'ABC' for your convenience.
For further information check:
- DJB's daemontools: The basic framework.
- Bruce Guenter: daemontools-encore including his enhancements.
- Gerrit Pape: run scripts suited for daemontools et al.
Man pages
daemontoolsx comes with a set of concise man pages. To become familiar with its concept, start reading supervise.
| Processes management | Logging/monitoring and timestamps | Supplementary tools |
|---|---|---|
| supervise | multilog | envdir |
| svc | readproctitle | envuidgid |
| svok | fghack | |
| svstat | tai64n | prgrphack |
| svscanboot | tai64nfrac | setlock |
| svscan | tai64nlocal | setuidgid |
| softlimit |
How to install daemontoolsx
In order to get a working version of daemontoolsx, you need to install the fitting fehQlibs in the first place. Please follow instructions here.
- daemontoolsx uses D.J. Bernstein's /package conventions for installation.
- Typically, un-tar the archive under /package, change to admin/daemontoolsx-<version> and call package/install.
- daemontoolsx is pre-packaged to be 64 bit clean and comes with additional man-pages.
Tickets, Change Requests, communication
An Ezmlmx mailing list keeps you updated with current developments, bug fixes, and features discussed. This list also can be used to file
- Defects (bug reports) and
- Change Requests (enhancements).
To inscribe use: daemontoolsx mailing list
As usual, I can't guarantee a certain response level; but reasonable issues will be answered.
