To my understanding systemd-journald
creates a couple sockets
, where it posts its logging events.
# systemctl cat systemd-journald.socket | egrep -v '^ *#'
[Unit]
Description=Journal Socket
Documentation=man:systemd-journald.service(8) man:journald.conf(5)
DefaultDependencies=no
Before=sockets.target
IgnoreOnIsolate=yes
[Socket]
ListenStream=/run/systemd/journal/stdout
ListenDatagram=/run/systemd/journal/socket
SocketMode=0666
PassCredentials=yes
PassSecurity=yes
ReceiveBuffer=8M
Service=systemd-journald.service
So how can I read these events? I tried:
# netcat -U /run/systemd/journal/stdout
# echo $?
0
# netcat -uU /run/systemd/journal/socket
netcat
immediately disconnect from the stdout
(exit status
is clean). netcat
connect to the socket
, but does not register any events - I can confirm this with the command journalctl -f -n0
which does show stuff going on, while socket
output is empty.
syslog-ng
utility shave off anything when it reads from them. – NarūnasK Oct 25 '17 at 11:11'/run/systemd/journal/syslog' it writes journal data there
. I just triednetcat -uU /run/systemd/journal/syslog
which yielded no results either. FYI I haveAlias=syslog.service
in mysyslog-ng.service
which to my understanding activates/run/systemd/journal/syslog
. – NarūnasK Oct 25 '17 at 14:58