Understanding Raspberry journalctl Logs

Asked 2 years ago, Updated 2 years ago, 42 views

If you look at the logs in the Journalctl of Raspberry Pi, you will see only the logs after reboot.

The journald.conf storage is set to persistent and the log is changed to /var/log/journal.
I have installed Raspbian-lite and have not changed anything other than journald.conf.
journalctl --list-boot also shows only one of the ID0. The journalctl-b-1 command will fail.

I've tried a couple of Raspbian versions including the latest ones, but it's the same.
Is it a Raspberry Pi specification?I think there's something missing because I'm a beginner.
Thank you for your cooperation.

raspberry-pi

2022-09-30 19:37

2 Answers

Have you written the logs to a file on RAM DISK?

Raspberry's external storage (auxiliary storage) is an SD card.
Because SD cards have a limited number of writes, it is common to create a RAM DISK that can use part of the RAM like a file and create a log file on top of it. (If the number of writes to the SD card exceeds the limit, the SD card will be corrupted (data will not be read or written).

RAM DISK is quick to read and write, but it is lost when it is shut down or restarted.If you are creating a log on RAM DISK, the contents of the log will be lost during a reboot or shutdown.
 I think Kaznnn's phenomenon is like this.


If you want to leave a log, you need to write the log file to a file on the SD card before shutting it down or rebooting, and copy the data from the file on the SD card to the log file on the RAM DISK at startup.


2022-09-30 19:37

Thank you for your prompt enjoyment.
We do not use RAM DISK as you pointed out.
In my case, the syslog, messages log remains after reboot.Only journalctl logs cannot be displayed.
If you normally use Raspian, do you still have the journal log after rebooting?
I've tried and tried many things, but I can't solve it, so please let me know what kind of information is good for me, so please let me know if there is anything that can give you a hint.
Thank you for your cooperation.


2022-09-30 19:37

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.