Manage Log Messages Under Systemd Using Journalctl [Comprehensive Guide]

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

5 Responses

  1. SmokinMoe says:

    I’m using Linux Mint 18.2 Sonya. My /etc/systemd/journald.conf has Storage=persistent set but when I run journalctl --list-boots I only ever get one entry, I’ve rebooted several times (and probably many times by the time you read this) but still no “persistency”.

    Any ideas?

    • Aaron Kili says:

      @SmokinMoe

      Run these commands to create a directory where your logs can be stored:

      # mkdir /var/log/journal
      # systemd-tmpfiles - -create - -prefix /var/log/journal
      # systemctl restart systemd-journald
      

      For more info, check out the solution in this thread: https://unix.stackexchange.com/questions/159221/how-do-i-display-log-messages-from-previous-boots-under-centos-7

      • SmokinMoe says:

        That seems to have fixed it. Thank you very much :-)

        I did some more research and discovered the documentation in /usr/share/doc/systemd/README.Debian says ‘If you enable persistent logging, consider uninstalling rsyslog or any other system-log-daemon, to avoid logging everything twice.”

        Should I uninstall?

        ‘rsyslog ‘sudo apt remove rsyslog‘ & ‘sudo apt purge rsyslog

        What about ‘other system-log-daemon’?

        • Aaron Kili says:

          @SmokinMoe

          If persistent storage is now working fine, I suggest you leave rsyslog installed. But if your system is now logging everything twice, then consider uninstalling it.

          • SmokinMoe says:

            How do I know if things are being logged twice?
            I guess two entries for every log item?

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.