138 lines
4.6 KiB
HTML
138 lines
4.6 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of SD_JOURNAL_GET_CUTOFF_REALTIME_USEC</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>SD_JOURNAL_GET_CUTOFF_REALTIME_USEC</H1>
|
|
Section: sd_journal_get_cutoff_realtime_usec (3)<BR>Updated: <BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
sd_journal_get_cutoff_realtime_usec, sd_journal_get_cutoff_monotonic_usec - Read cut-off timestamps from the current journal entry
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<P>
|
|
<B>
|
|
</B><PRE>
|
|
#include <<A HREF="file:///usr/include/systemd/sd-journal.h">systemd/sd-journal.h</A>>
|
|
</PRE>
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">
|
|
<B>int sd_journal_get_cutoff_realtime_usec(sd_journal *</B><I>j</I><B>, uint64_t *</B><I>from</I><B>, uint64_t *</B><I>to</I><B>);</B>
|
|
|
|
<DT id="2">
|
|
<B>int sd_journal_get_cutoff_monotonic_usec(sd_journal *</B><I>j</I><B>, sd_id128_t </B><I>boot_id</I><B>, uint64_t *</B><I>from</I><B>, uint64_t *</B><I>to</I><B>);</B>
|
|
|
|
</DL>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
|
|
<B>sd_journal_get_cutoff_realtime_usec()</B>
|
|
<DD>retrieves the realtime (wallclock) timestamps of the first and last entries accessible in the journal. It takes three arguments: the journal context object
|
|
<I>j</I>
|
|
and two pointers
|
|
<I>from</I>
|
|
and
|
|
<I>to</I>
|
|
pointing at 64-bit unsigned integers to store the timestamps in. The timestamps are in microseconds since the epoch, i.e.
|
|
<B>CLOCK_REALTIME</B>. Either one of the two timestamp arguments may be passed as
|
|
<B>NULL</B>
|
|
in case the timestamp is not needed, but not both.
|
|
<P>
|
|
|
|
<B>sd_journal_get_cutoff_monotonic_usec()</B>
|
|
retrieves the monotonic timestamps of the first and last entries accessible in the journal. It takes three arguments: the journal context object
|
|
<I>j</I>, a 128-bit identifier for the boot
|
|
<I>boot_id</I>, and two pointers to 64-bit unsigned integers to store the timestamps,
|
|
<I>from</I>
|
|
and
|
|
<I>to</I>. The timestamps are in microseconds since boot-up of the specific boot, i.e.
|
|
<B>CLOCK_MONOTONIC</B>. Since the monotonic clock begins new with every reboot it only defines a well-defined point in time when used together with an identifier identifying the boot, see
|
|
<B><A HREF="/cgi-bin/man/man2html?3+sd_id128_get_boot">sd_id128_get_boot</A></B>(3)
|
|
for more information. The function will return the timestamps for the boot identified by the passed boot ID. Either one of the two timestamp arguments may be passed as
|
|
<B>NULL</B>
|
|
in case the timestamp is not needed, but not both.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>RETURN VALUE</H2>
|
|
|
|
<P>
|
|
|
|
<B>sd_journal_get_cutoff_realtime_usec()</B>
|
|
and
|
|
<B>sd_journal_get_cutoff_monotonic_usec()</B>
|
|
return 1 on success, 0 if not suitable entries are in the journal or a negative errno-style error code.
|
|
<P>
|
|
|
|
Locations pointed to by parameters
|
|
<I>from</I>
|
|
and
|
|
<I>to</I>
|
|
will be set only if the return value is positive, and obviously, the parameters are non-null.
|
|
<A NAME="lbAF"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
<P>
|
|
|
|
All functions listed here are thread-agnostic and only a single specific thread may operate on a given object during its entire lifetime. It's safe to allocate multiple independent objects and use each from a specific thread in parallel. However, it's not safe to allocate such an object in one thread, and operate or free it from any other, even if locking is used to ensure these threads don't operate on it at the very same time.
|
|
<P>
|
|
|
|
These APIs are implemented as a shared library, which can be compiled and linked to with the
|
|
<B>libsystemd</B> <B><A HREF="/cgi-bin/man/man2html?1+pkg-config">pkg-config</A></B>(1)
|
|
file.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<P>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+systemd">systemd</A></B>(1),
|
|
<B><A HREF="/cgi-bin/man/man2html?3+sd-journal">sd-journal</A></B>(3),
|
|
<B><A HREF="/cgi-bin/man/man2html?3+sd_journal_open">sd_journal_open</A></B>(3),
|
|
<B><A HREF="/cgi-bin/man/man2html?3+sd_journal_get_realtime_usec">sd_journal_get_realtime_usec</A></B>(3),
|
|
<B><A HREF="/cgi-bin/man/man2html?3+sd_id128_get_boot">sd_id128_get_boot</A></B>(3),
|
|
<B><A HREF="/cgi-bin/man/man2html?2+clock_gettime">clock_gettime</A></B>(2)
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="3"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="4"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="5"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="6"><A HREF="#lbAE">RETURN VALUE</A><DD>
|
|
<DT id="7"><A HREF="#lbAF">NOTES</A><DD>
|
|
<DT id="8"><A HREF="#lbAG">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:55 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|