UCSPILOGD(8)
UCSPILOGD(8) π
okay bestie, this is a page from the System Manager's Manual, and the main character is ucspilogd β lowkey a tiny Unix icon. Let's get into it π«Ά
πΈ NAME πΈ
ucspilogd β convert syslog facility numbers and alert levels into names
β¨ SYNOPSIS β¨
ucspilogd [-d undef] [var ...]
π DESCRIPTION π
okay so picture this: ucspilogd reads a stream of syslog-like messages on stdin. Those messages can be newline-terminated or null-terminated. No cap.
For every line it reads: if it has been given var arguments, it writes the value of every var environment variable, followed by a colon and a space. Cute, right?
If the line begins with a syslog facility number and/or alert level in the syslog format, it converts them into a human-readable name in the syslogd fashion. Iconic.
It then writes the processed line to stdout. Slay.
You can emulate the whole syslogd behaviour by combining the following components:
- A Unix stream super-server such as
s6-ipcserver(8)listening to the Unix domain socket/dev/log, to connect to the kernel log-reading interface. ucspilogdrunning under that super-server, to read the logs and perform adequate transformations.- A logger such as
s6-log(8)to store the logs into the filesystem. - A supervision mechanism such as s6, to ensure ease of use and reliability of the whole chain.
The resulting suite of programs is still smaller, and way more reliable, than a standard syslogd. fr fr.
In the examples/syslogd-linux subdirectory of the s6 package, you will find a suitable ucspilogd s6-service-directory(7). The run scripts are written in the execline[1] language. iykyk.
π§ Using ucspilogd as a klogd replacement π§
Certain Unix kernels offer a nice interface to the kernel logs. For instance, the Linux kernel provides the /proc/kmsg fake file, that can be opened and read like a normal file, except that it gives the kernel logs when they are available and blocks otherwise. You can use ucspilogd to process data from those interfaces. Obsessed.
The examples/klogd-linux subdirectory of the s6 package is an s6-service-directory(7) providing such a klogd service for Linux, using the /proc/kmsg interface. Periodt.
π OPTIONS π
-d undefβ when a variablevargiven on the command line is actually undefined atucspilogdexecution time, print undef in place of what would be the variable's value on every line. Default is the string β<undefined>β.
π¦ SEE ALSO π¦
s6-log(8)[1]https://skarnet.org/software/execline/- This man page is ported from the authoritative documentation at:
https://skarnet.org/software/s6/ucspilogd.html
π AUTHORS π
- Laurent Bercot
- Alexis
<flexibeast@gmail.com>(man page port)
mwah π this page is from Debian, dated September 29, 2021, and it's UCSPILOGD(8) β signing off, bestie π«Ά
π¦ 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