CentOS 7 Journalctl

view journal: journalctl

View journal only of a given priority, for example warning and above: journalctl –p warning

View journal since yesterday: journalctl –since yesterday

View journal in a time range: –since 02:00 –until 04:00 or –since 2016-07-01 –until 2015-07-05

View last 20 entries: journalctl –n 20

Verbose journa: journalctl –o verbose

Make the journal persistent across reboots rather than RAM only:

mkdir /var/log/journal

chgrp systemd-journal /var/log/journal

chmod 2775 /var/log/journal

systemctl restart systemd-journald.service

Historical logs for past boots can then be viewed with the journalctl –b switch. –b 0 is the current boot, -b 1 the previous boot, and so on.

Close Menu
×
×

Cart