RHEL 7 – Notes: Journalctl

Journalctl to view system logs:

===========================

journalctl -n
journalctl -n 5
journalctl -p err
journalctl –since today
journalctl –since “2015-12-22 02:00:00” –until “2015-12-22 03:00:00”
journalctl -o verbose

journalctl _PID=1

journalctl -b (since last reboot if they were made persistent)

 

How to make persistent:

mkdir /var/log/journal

chown root:systemd-journal /var/log/journal

chmod 2755 /var/log/journal

kilall -USR1 systemd-journald