Re: Why systemd-journald is creating '/var/log/journal/machine_id" directory when Storage=auto

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Awesome, thanks! 

Also, where can I find the code section where services And kernel logs to journald?
After tracing from 'main' at journald.c I came across the part where various sockets are opened and validated (/run/systemd/journal/stdout, /dev/kmsg, /dev/log ) for journald to listen to logs of systemd services and kernel. That is the server side part.

Where can I find the client side journald code where services and kernel sends their logs to journal.

Nishant

On Sun, 29 Aug 2021, 18:39 Michael Chapman, <mike@xxxxxxxxxxxxxxxxx> wrote:
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.

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux