Journalctl. What kind of journald setting is more correct?
journald allows you to configure yourself through a configuration file or command line.
Configuration file: SystemMaxUse = - the maximum amount that logs can occupy on the disk; SystemKeepFree = - the amount of free space that should remain on the disk after saving logs; SystemMaxFileSize = - the size of the log file upon which it should be removed from the disk; RuntimeMaxUse = - the maximum amount that logs can occupy in the file system / run; RuntimeKeepFree = - the amount of free space that must remain in the file system / run after saving logs; RuntimeMaxFileSize = - the size of the log file upon which it should be removed from the file system / run. Command line: journalctl --vacuum-size = 1G journalctl --vacuum-time = 1years Which option is more correct in view of saving the settings after rebooting or shutting down? |
From 'man systemd-journald'...
Quote:
Quote:
|
What privileges should I give /var/log/journal?
|
Just create it as root - systemd will change it as needed.
As for your initial question, use the config file - the vaccuum options are probably for when you find you have to release some space in a hurry. |
Might not be worth worrying about - this laptop has journals since late May 2015, and totals 1.8 Gig. With the size of disks these days, who cares .
|
1.8 GB and if the server. Should I give the log 5-10 Gb?
|
Quote:
|
If you create it as root, systemd-journald will re-apply the correct group itself next boot...
Code:
# ls -l /var/log/journal |
Quote:
|
Usually, the administrator would make those that need journal access members of the appropriate group.
|
Quote:
|
To expand on that, I can run journalctl as a regular user, but some reporting requires me to be root (eg run via sudo), or a member of the 'systemd-journal' group.
From 'man journalctl'... Quote:
|
For example, if I do 'journal -b' as user, I can only see my user log...
Code:
~> journalctl -b |
Quote:
|
Yes, that can be done eg
Code:
# journal --file journalctl --file /path/to/another/system.journal Quote:
|
All times are GMT -5. The time now is 03:24 PM. |