S6-SOCKLOG(8)
π S6-SOCKLOG(8) β the minimal syslog daemon, but make it a group chat
okay so this is the manual page for s6-socklog, from the System Manager's Manual, and bestie you are about to understand syslog on a spiritual level. let's go π«Ά
β¨ NAME β¨
s6-socklog β a minimal syslog daemon. like, minimal minimal. it does its one job and it slays π
πΈ SYNOPSIS πΈ
s6-socklog [-d notif] [-r] [-U | -u uid -g gid -G gidlist] [-l linelen]
[-t lameducktimeout] [-x unixsocket | -i ipport]
π¦ DESCRIPTION π¦
s6-socklog is a glow-up reimplementation of the socklog(8) program, except with a few extra features. it's giving "same girl, better hair" β¨
So here's the vibe: s6-socklog reads datagrams from the /dev/log Unix domain socket β or from a Unix domain or Internet domain socket of your choice if you're feeling spicy β converts the encoded syslog facility and priority names into their human-readable equivalents, and prints the logs to its stdout. iconique.
s6-socklogbinds to/dev/log.- It drops its root privileges. (responsible queen behavior π)
- For every datagram it reads, it turns its content into a log line:
- Messages are truncated to 1024 characters.
- Trailing nulls or newlines are removed.
- Embedded nulls or newlines are converted to
~characters (tildes). - A
syslogcodeat the beginning of the line is converted tofacility.priority:.
- It prints the log line to its stdout, terminated by a newline.
- It exits 0 on a
SIGTERM.
π Signals
s6-socklog reacts to the following signals:
SIGTERMβ exit as soon as possible. no drama, no goodbyes, just gone π§
π Typical use
s6-socklog can be paired with s6-log(8) to implement syslogd functionality. think of it as a collab π€
s6-socklog acts as the frontend: it reads the log lines and processes them, then pipes them to an s6-log(8) instance that acts as the backend β i.e. it sorts the log lines depending on regular expressions that typically involve the facility and priority names, then stores them into the filesystem.
The pipe between s6-socklog and s6-log(8) is typically a logging pipe automatically provided by s6-svscan(8) when the s6-log(8) instance is declared as a logger service for the s6-socklog instance. so they're literally linked up by the system, it's fate π
The examples/ subdirectory of the s6 package contains a turnkey syslogd service that implements this pattern.
lowkey important:s6-socklogcannot be used unders6-ipcserver(8)or another super-server. It does not implement the "socklog ucspi functionality", which is provided by theucspilogd(8)program instead. wrong tool for that job, bestie, don't do it π
π OPTIONS π
-rβ raw logging.<syslogcode>codes will not be converted to facility/priority names. you get the raw unedited footage, no filter β¨-d notifβ when ready (actually bound to its socket), write a newline to file descriptor notif then close it. this allowss6-socklogto use thes6-notifywhenup(7)mechanism to notify readiness. notif cannot be less than 3. if this option is not given, no readiness notification is sent. it's basically the "i'm here, i'm ready, i'm that girl" ping π-u uidβ drop user id to uid.-g gidβ drop group id to gid.-G gidlistβ set supplementary group list to gidlist, which must be given as a comma-separated list of numeric gids, without spaces. no spaces, bestie, i'm serious π«Ά-Uβ set user id, group id and supplementary group list to the values of theUID,GIDandGIDLISTenvironment variables. if a-u,-gor-Goption is given after-U, the command line value overrides the environment variable. later wins, periodt π-l linelenβ set the maximum datagram size to linelen. default is 1024. it cannot be set to less than 80 or more than 1048576. if a datagram is bigger than linelen, it will be truncated to linelen characters, and the logged line will end with a...ellipsis to show the truncation. the...is the "and that's all you're getting" indicator π-t lameducktimeoutβ on receipt of aSIGTERM, gives6-sockloga grace period of lameducktimeout milliseconds to flush any log lines that are still in its buffer. default is 0, which means infinite β the program will only exit when its buffer is empty, and may wait forever. if lameducktimeout is nonzero and the timeout expires, the program will exit 99. the "i need a minute" option, but sometimes the minute never comes π-x unixsocketβ bind to a Unix domain socket at unixsocket. default is/dev/log.-i ipportβ bind to a UDP socket. ipport is a combination of ip, which must be an IPv4 or IPv6 address, and port, which must be an integer. port may be omitted, in which case it defaults to 514. if port is given, ip and port must be separated by a_character (an underscore). if ip is IPv4, a:(colon) can be used instead of an underscore. when this option is used,s6-socklogwill prepend every log line withclientip_clientport:, clientip and clientport being the IP address and port of the client that sent the log datagram. caller ID but for syslog, iconic π₯
π₯ EXIT STATUS π₯
0βSIGTERMreceived, clean exit. the graceful goodbye πΈ99βSIGTERMreceived but the buffer could not be flushed in time, some logs may be lost. tragedy, honestly π100β wrong usage. you did it wrong bestie, it's giving user error.111β system call failed. the OS said no. rude. π
π SEE ALSO π
s6-ipcserver(8), s6-log(8), s6-svscan(8), socklog(8), ucspilogd(8)
This man page is ported from the authoritative documentation at: https://skarnet.org/software/s6/s6-socklog.html
β AUTHORS β
Laurent Bercot Alexis <flexibeast@gmail.com> (man page port)
okay that's the whole thing, and before you go β huge shoutout to the Debian crew, this one's dated September 29, 2021, and it shipped as part of the System Manager's Manual on Debian. go forth and log responsibly πβ¨
π¦ where this page comes from
- nixpkgs unstable: s6 2.15.1.0
- nixpkgs unstable: s6-man-pages 2.14.0.1.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms