2
While I'm debugging a systemd error in my system, I noted the that journalctl -u
doesn't do what I expected. For example, I want to see logs about systemd-modules-load
unit. Here are two ways I did it, and they yielded different results.
using -u systemd-modules-load
$ journalctl -u systemd-modules-load | tail
Mar 13 15:47:53 dhcp-rhodes-1379.eduroam.cornell.edu systemd[1]: Stopped Load Kernel Modules.
-- Reboot --
Mar 13 15:55:37 localhost.localdomain systemd[1]: Starting Load Kernel Modules...
Mar 13 15:55:37 localhost.localdomain systemd[1]: Started Load Kernel Modules.
Mar 13 15:55:48 localhost.localdomain systemd[1]: Stopped Load Kernel Modules.
-- Reboot --
Mar 13 15:56:09 localhost.localdomain systemd[1]: Started Load Kernel Modules.
Mar 13 15:57:07 localhost.localdomain systemd[1]: Stopped Load Kernel Modules.
-- Reboot --
Mar 13 15:57:24 localhost.localdomain systemd[1]: Started Load Kernel Modules.
grep the raw output of journalctl
$ journalctl | grep modules | tail
Mar 13 15:57:07 localhost.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-modules-load comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 13 15:57:07 localhost.localdomain audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-modules-load comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 13 15:57:19 localhost.localdomain systemd-modules-load[225]: Failed to find module 'vboxdrv'
Mar 13 15:57:19 localhost.localdomain systemd-modules-load[225]: Failed to find module 'vboxnetflt'
Mar 13 15:57:19 localhost.localdomain systemd-modules-load[225]: Failed to find module 'vboxnetadp'
Mar 13 15:57:19 localhost.localdomain systemd-modules-load[225]: Failed to find module 'vboxpci'
I was expecting the output should be somewhat identical. Is there a reason for such a discrepancy?
State what systemd version you are using.
systemctl --version
. – Mark Stosberg – 2017-03-13T22:21:06.047