<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 25 February 2015 at 20:50, Chris Morgan <span dir="ltr"><<a href="mailto:chmorgan@gmail.com" target="_blank">chmorgan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">From <a href="http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html#__MONOTONIC_TIMESTAMP=" target="_blank">http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html#__MONOTONIC_TIMESTAMP=</a><br>
it looks like __MONOTONIC_TIMESTAMP might be just what I'm looking for<br>
but the information at the start of that section has me wondering if I<br>
can rely on this __MONOTONIC_TIMESTAMP being present for all entries<br>
and use this as the system uptime.<br></blockquote><div><br></div><div>Those three fields will always be present.</div><div>They are not *in* the data, but metadata kept for every journal entry.</div><div>At the libsystemd level, you access them via their own apis, seeĀ <a href="http://www.freedesktop.org/software/systemd/man/sd_journal_get_cutoff_monotonic_usec.html">http://www.freedesktop.org/software/systemd/man/sd_journal_get_cutoff_monotonic_usec.html</a></div><div><br></div><div>Please refer to `man 2 clock_gettime` on whether CLOCK_MONOTONIC suits your needs for an 'uptime' clock.</div></div></div></div>