Bookmark this page

Guided Exercise: Configure a Persistent systemd Journal

In this lab, students will make the systemd journal persistent.

Outcomes

The systemd journal is written to disk.

  1. Configure the systemd journal to be persistent across reboots.

    1. Configure the directory /var/log/journal on serverX.

      [root@serverX ~]# mkdir /var/log/journal
      [root@serverX ~]# chown root:systemd-journal /var/log/journal
      [root@serverX ~]# chmod 2755 /var/log/journal
      
    2. Send the USR1 signal to the systemd-journald or reboot serverX.

      [root@serverX ~]# killall -USR1 systemd-journald
  2. To verify the systemd journal is persistent, look for a new directory with the systemd journal log files that have been written to /var/log/journal. (The exact files which appear may vary on your system, but the directory should have similar contents to the following example.)

    [root@serverX ~]# ls /var/log/journal/4513ad59a3b442ffa4b7ea88343fa55f
    system.journal     user-1000.journal
    
Revision: rh124-7-1b00421