On 25 February 2015 at 20:50, Chris Morgan <[email protected]> wrote:

> From
> http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html#__MONOTONIC_TIMESTAMP=
> it looks like __MONOTONIC_TIMESTAMP might be just what I'm looking for
> but the information at the start of that section has me wondering if I
> can rely on this __MONOTONIC_TIMESTAMP being present for all entries
> and use this as the system uptime.
>

Those three fields will always be present.
They are not *in* the data, but metadata kept for every journal entry.
At the libsystemd level, you access them via their own apis, see
http://www.freedesktop.org/software/systemd/man/sd_journal_get_cutoff_monotonic_usec.html

Please refer to `man 2 clock_gettime` on whether CLOCK_MONOTONIC suits your
needs for an 'uptime' clock.
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to