I have a question about journald :
given the hardware configuration (mostly sd card) you didn’t create a /var/log/log directory to store logs, did you ? The consequence is that they are lost on reboot.
Now, some of us are using HD/SSD storage solution, so could you change that behaviour or at least explain how to do via a wiki page ? (mainly “mkdir -p /var/log/journal ; systemctl restart systemd-journald” because nothing is set on the /etc/systemd/journald.conf config file and the default option is auto)
Edit : maybe this post should go to the general discussion category ?
This discusses the various options you can you can use for journal persistence.
I know this page and I’ve looked at it before posting. Moreover the first sentence is “In Arch Linux, the directory /var/log/journal/ is a part of the systemd package” which is not the case on my manjaro rpi4. That’s why I asked.
All I changed in /etc/systemd/journald.conf is these lines to have a limit because most people will be using a sdcard. This in the mate and xfce DE’s I created. I do not know what is used in the other DE’s:
Comment out the 2 SystemMax* lines and it will revert back to the programs default after reboot.
I’m afraid I don’t understand your answer : AFAIK there is no /var/log/journal directory on the RPI4 even in the last manjaro release.
As the journald default setting is set to “auto” and and no directory is present the logs are writed to
/run/systemd/journal in a nonpersistent way.
I can understand that it’s a good behaviour when using sdcard but as I said can we indicate how to do otherwise in other cases ?
I didn’t try that because it was not my goal, I guess it should work to have pemanent logs.
I just wanted to point out that by default our journal logs are not saved and I think we can explain how to do it easily.
I also see that is a difference from Archlinux where /var/log/journal is created by default and I understand the difference due to hardware constraints.
I place /var/log on a tmpfs. I find old logs helpful from time to time… but usually the current boot is the one I am interested in. So why decrease the lifespan of my SD and SSD by logging to disk? Logging gone bad can chew up a SD/SSD. If/when I need it, I can always turn it on then.
Edit: I forgot, rather than tmpfs for /var/log I now use zram, for the data compression.
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.