FILES
/etc/systemd/journald.conf
Configure systemd-journald behavior. See journald.conf(5).
/run/log/journal/machine-id/*.journal,
/run/log/journal/machine-id/*.journal~,
/var/log/journal/machine-id/*.journal,
/var/log/journal/machine-id/*.journal~
systemd-journald writes entries to files in
/run/log/journal/machine-id/ or /var/log/journal/machine-id/ with
the ".journal" suffix. If the daemon is stopped uncleanly, or if
the files are found to be corrupted, they are renamed using the
".journal~" suffix, and systemd-journald starts writing to a new
file. /run is used when /var/log/journal is not available, or when
Storage=volatile is set in the journald.conf(5) configuration file.
Note however that Ubuntu is not using a persistent journald log file by default. Only the volatile /run/log/journal/<machine-id>/*.journal[~] is kept until the next boot. All is lost at each reboot.
You may see a list of boot retained in the log with:
journalctl --list-boot
The logs are still kept in a text file under /var/log unless you have activated the use of persistent journald log by creating /var/log/journal directory.
There the "Storage=" option controls whether to store journal data or not, and where. Possible values are "volatile", "persistent", "auto" and "none". Defaults to "auto".
If "volatile", journal log data will be stored only in memory, i.e. below the /run/log/journal hierarchy (which is created if needed).
If "persistent", data will be stored preferably on disk, i.e. below the /var/log/journal hierarchy (which is created if needed), with a fallback to /run/log/journal (which is created if needed), during early boot and if the disk is not writable.
"auto" is similar to "persistent" but the directory /var/log/journal is not created if needed, so that its existence controls where log data goes.
"none" turns off all storage, all log data received will be dropped.
From
man systemd-journald
:And as
man journalctl
says:These logs are managed by the
systemd-journald
service, so a more appropriate term would be "journald
logs".Note however that Ubuntu is not using a persistent journald log file by default. Only the volatile
/run/log/journal/<machine-id>/*.journal[~]
is kept until the next boot. All is lost at each reboot.You may see a list of boot retained in the log with:
The logs are still kept in a text file under
/var/log
unless you have activated the use of persistent journald log by creating/var/log/journal
directory.Short answer
Usually the storage directory is
/var/log/journal
or/run/log/journal
, but it doesn't have to necessarily exist in your system.If you just want to check the amount of space that the journal is currently occupying on your disk, simply type:
Long answer
The storage directory depends on journald configuration.
Configuration files are:
There the "
Storage=
" option controls whether to store journal data or not, and where. Possible values are "volatile
", "persistent
", "auto
" and "none
". Defaults to "auto
".If "
volatile
", journal log data will be stored only in memory, i.e. below the /run/log/journal hierarchy (which is created if needed).If "
persistent
", data will be stored preferably on disk, i.e. below the /var/log/journal hierarchy (which is created if needed), with a fallback to /run/log/journal (which is created if needed), during early boot and if the disk is not writable."
auto
" is similar to "persistent
" but the directory/var/log/journal
is not created if needed, so that its existence controls where log data goes."
none
" turns off all storage, all log data received will be dropped.In addition to Muru's answer on where data is stored there are other relevant answers.
How to increase
journalctl
to find previous boot logsHow to keep
journalctl
file size down