meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:systemd:journald [2018/12/17 07:51] niziaklinux:systemd:journald [2024/09/17 16:32] (current) niziak
Line 1: Line 1:
 +====== journald ======
 +
  
 Follow journal and show only entries with **err** priority Follow journal and show only entries with **err** priority
Line 11: Line 13:
   * 6 info (Informational messages)   * 6 info (Informational messages)
   * 7 debug   * 7 debug
 +
 +====== Assigning stderr priorities ======
 +
 +<code bash>man 3 sd-daemon</code>
 +
 +<code c>
 +fprintf(stderr, SD_NOTICE "Hello World!\n")
 +</code>
 +
 +====== reduce journal size ======
 +
 +<code bash>
 +# runtime
 +sudo journalctl --vacuum-size=50M
 +
 +# permanent
 +echo SystemMaxUse=50M | sudo tee -a /etc/systemd/journald.conf
 +</code>
 +
 +====== read journal from custom location ======
 +
 +<code bash>
 +journalctl --directory=/mnt/var/lib/journal
 +journalctl --file=/mnt/var/lib/journal/user-1000@*
 +</code>
 +
 +
 +