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 between 0 and 7 (which correspond to those same named levels). these priority values are the same ones defined by syslog(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 from stderr will still be logged, with the same default priority level as stdout. also, heads up: when stdout and stderr use 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 so stdout messages will not be strictly ordered with respect to stderr messages โ€” 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 priority 5 ("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, see systemd-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