[systemd-devel] Monotonic time went backwards, rotating log

Lennart Poettering lennart at poettering.net
Wed May 24 14:38:45 UTC 2023


On Di, 23.05.23 11:04, Phillip Susi (phill at thesusis.net) wrote:

> Every time I reboot, when I first log in, journald ( 253.3-r1 )
> complains that the monotonic time went backwards, rotating log file.
> This appears to happen because journal_file_append_entry_internal()
> wishes to enforce strict time ordering within the log file.  I'm not
> sure why it cares about the *monotonic* time being in strict order
> though, since that will always go backwards when you reboot.  I'm also
> not sure why the previous check that the boot ID has changed did not
> trigger.

We want that within each file all records are strictly ordered by all
clocks, so that we can find specific entries via bisection.

Rotation doesn't mean systemd doesn't look at the records
anymore. journalctl will look at all journal files it discoveres and
display them in a single unified "interleaved" stream, so that you
can't see that they are stored in separate journal files.

> If it is intentional that journals be rotated after a reboot, could it
> at least be done without complaining about it?

The message is debug level, no?

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list