[systemd-devel] Why systemd-journald is creating '/var/log/journal/machine_id" directory when Storage=auto

Michael Chapman mike at very.puzzling.org
Sun Aug 29 13:09:14 UTC 2021


On Sun, 29 Aug 2021, Nishant Nayan wrote:
> Also I was wondering where in the code does journald.config file changes
> are parsed?
> For example in the above code , the line :-
>       if (s->storage == STORAGE_PERSISTENT)
> Here, s->storage corresponds to 'Storage' option of conf file right?
> How is it getting set when we edit the conf file?

The configuration files are loaded in server_parse_config_file(). The 
actual code that maps keys in the files to variables in the program is 
generated by gperf [1] from the journald-gperf.gperf source file.

[1] https://www.gnu.org/software/gperf/manual/html_node/index.html

> Also, on doing "ls /run/log/journal/machine_id/"
> I can see output as following
> <some_big_number>.journal
> <some_another_big_number>.journal
> .
> .
> .
> system.journal
> 
> Is 'system.journal' is the currently active journal and rest are archived
> journals?

That's correct.


More information about the systemd-devel mailing list