SYSTEMD-CAT(1)
๐ systemd-cat โ the journal-gluing bestie (from the systemd manual, section 1) ๐
okay so bestie, welcome to systemd-cat โ it's the little systemd tool that connects a pipeline or a program's output with the journal. no cap, it's literally the vibe bridge between your random command and the journal. โจ
๐ธ SYNOPSIS ๐ธ
systemd-cat [OPTIONS...] [COMMAND] [ARGUMENTS...]
systemd-cat [OPTIONS...]
๐ฆ DESCRIPTION ๐ฆ
so here's the tea. systemd-cat can do one of two things:
- connect the standard output and error output of a command to the journal
- act as a filter tool in a shell pipeline, passing whatever the previous pipeline element generated straight into the journal
If you pass no parameter at all, systemd-cat will write everything it reads from standard input (stdin) to the journal. just vibing, absorbing, journaling. ๐ซถ
If you do pass parameters, they get executed as a command line with standard output (stdout) and standard error output (stderr) connected to the journal โ so literally everything it writes ends up stored in the journal. iconic.
โจ OPTIONS โจ
the following options are understood, and yes we're doing all of them:
-h,--helpโ prints a short help text and dips out. bye bestie ๐--versionโ prints a short version string and exits. short and sweet fr fr.-t,--identifier=โ give a short string that identifies the logging tool. if you don't specify one, no identification string is set for the journal entry, and instead the executable name (or"cat"if the input is being read from a pipe) is used to describe the log source. so it'll still have a name, just not the one you picked. ๐-p,--priority=โ sets the default priority level for the logged messages. pass one of"emerg","alert","crit","err","warning","notice","info","debug", or a value between0and7(which correspond to those same named levels). these priority values are the same ones defined bysyslog(3). defaults to"info". โ ๏ธ important: this only controls the default โ individual lines may be logged at different levels if they're prefixed accordingly. for the deets, see--level-prefix=below. ๐--stderr-priority=โ sets the default priority level for messages coming from the process's standard error output (stderr). usage is exactly the same as the--priority=option above, and both can be used at the same time. when both are used,--priority=specifies the default priority for standard output (stdout). if--stderr-priority=is not specified, messages fromstderrwill still be logged, with the same default priority level asstdout. also, heads up: whenstdoutandstderruse the same default priority, the messages will be strictly ordered, because one channel is used for both. when the default priority differs, two channels are used, and sostdoutmessages will not be strictly ordered with respect tostderrmessages โ though they will tend to be approximately ordered. (approximately ordered is such a mood honestly ๐)- Added in version 241.
--level-prefix=โ controls whether lines read are parsed for syslog priority level prefixes. if enabled (and it's enabled by default), a line prefixed with a priority prefix such as"<5>"is logged at priority5("notice"), and similarly for the other priority levels. takes a boolean argument. ๐ฅ--namespace=โ specifies the journal namespace to which the standard IO should be connected. for details about journal namespaces, seesystemd-journald.service(8). ๐- Added in version 256.
๐ EXIT STATUS ๐
on success, 0 is returned. a non-zero failure code otherwise. that's it, that's the whole status story. slay.
๐ EXAMPLES ๐
Example 1. Invoke a program
this calls /bin/ls with standard output and error connected to the journal:
# systemd-cat ls
Example 2. Usage in a shell pipeline
this builds a shell pipeline that also invokes /bin/ls and writes the output it generates to the journal:
# ls | systemd-cat
even though the two examples have very similar effects, the first is preferable โ because only one process is running at a time and both stdout and stderr are captured, while in the second example, only stdout is captured. so like, example 1 ate and left no crumbs. ๐
๐ SEE ALSO ๐
and that's the whole page bestie!! this was pulled from systemd 262.1, manual page SYSTEMD-CAT(1) โ go journal something iconic, ily, mwah ๐โจ๐ฆ
๐ฆ where this page comes from
- arch rolling: systemd 262.1-1 ยท LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms