Jump to content

Logging to RAM counteracted by soft-linking /var/log/journal to /var/log.hdd/journal ?


Recommended Posts

Posted

Due to systemd, Journal is going to replace all journals sooner or later, it's already one of the busiest journaling on the sytem. The logs are binary and can't be rotated like text logs, they are already compressed and can't be read by text editor, instead only by journalctl.

 

Thus, in /usr/lib/armbian/armbian-ramlog , the directory /var/log/journal is excluded from standard log rotation and copying to HDD. Instead, it is copied once to /var/log.hdd/journal and a soft-link is created: /var/log/journal pointing to -> /var/log.hdd/journal .

 

The RAM logging was introduced to spare the SD card, preventing many write actions that wear the SD card quickly. But this really busy log, including all system messages, is now written directly to the SD card. If this is the only way of preserving older systemd logs, shouldn't we then at least reconfigure journald in a way to e.g. log into RAM /run/log/journal and only snyc to SD card every n hours? Or maybe we could reduce the log level of journald (which is by default "debug") to e.g. "err" and reduce the write activity in that way?

 

For me, it appears right now, that all the benefits of logging to RAM disk are canceled out by having journald log to SD card?

 

Please correct me if I am mistaken in any of my assumptions above.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines