We're having issues with a customer having RedHat 7 PC's shutdown intermittently.
One was just sent in for repair, and I'd like to check the journald output.
However, I've read the rebooting the system overwrites it.
How can I view this journal without rebooting the system? Do I need a bootable RedHat or Centos USB stick? If so, how to I create it? How would I then view the drive/file?
If it was shut down already, you'll have no luck. By default, Journald on CentOS 7/8 is storing log data in RAM.
You can ensure Journald logs data in persistent mode, by simply creating
/var/log/journal
:This however, applies to currently booted machine and further reboots will have the data retained.
Typically the data is stored in the
/var/log
directory. To configure the logging details see:https://www.freedesktop.org/software/systemd/man/journald.conf.html
Setting
Storage=persistent
will ensure the data is written to disk.The following values can be used to control the size limits:
SystemMaxUse=, SystemKeepFree=, SystemMaxFileSize=, SystemMaxFiles=, RuntimeMaxUse=, RuntimeKeepFree=, RuntimeMaxFileSize=, RuntimeMaxFiles=
Files can then be read searched using
journalctl
.You can edit the configuration file in /etc/systemd/journald.conf & make
storage=persistant
and then it will store all the logs in/var/log/journal
.