meta data for this page
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux:systemd:journald [2018/12/17 07:46] – created niziak | linux: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 | ||
<code bash> | <code bash> | ||
- | Vali priorities are (syslog): | + | Valid priorities are (syslog): |
* 0 emerg (panic / System is unusable) | * 0 emerg (panic / System is unusable) | ||
* 1 alert | * 1 alert | ||
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 c> | ||
+ | fprintf(stderr, | ||
+ | </ | ||
+ | |||
+ | ====== reduce journal size ====== | ||
+ | |||
+ | <code bash> | ||
+ | # runtime | ||
+ | sudo journalctl --vacuum-size=50M | ||
+ | |||
+ | # permanent | ||
+ | echo SystemMaxUse=50M | sudo tee -a / | ||
+ | </ | ||
+ | |||
+ | ====== read journal from custom location ====== | ||
+ | |||
+ | <code bash> | ||
+ | journalctl --directory=/ | ||
+ | journalctl --file=/ | ||
+ | </ | ||
+ | |||
+ | |||
+ |