]>
Commit | Line | Data |
---|---|---|
14228c0d | 1 | '\" t |
f47781d8 | 2 | .TH "SD_JOURNAL_GET_CUTOFF_REALTIME_USEC" "3" "" "systemd 218" "sd_journal_get_cutoff_realtime_usec" |
14228c0d MB |
3 | .\" ----------------------------------------------------------------- |
4 | .\" * Define some portability stuff | |
5 | .\" ----------------------------------------------------------------- | |
6 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
7 | .\" http://bugs.debian.org/507673 | |
8 | .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html | |
9 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
10 | .ie \n(.g .ds Aq \(aq | |
11 | .el .ds Aq ' | |
12 | .\" ----------------------------------------------------------------- | |
13 | .\" * set default formatting | |
14 | .\" ----------------------------------------------------------------- | |
15 | .\" disable hyphenation | |
16 | .nh | |
17 | .\" disable justification (adjust text to left margin only) | |
18 | .ad l | |
19 | .\" ----------------------------------------------------------------- | |
20 | .\" * MAIN CONTENT STARTS HERE * | |
21 | .\" ----------------------------------------------------------------- | |
22 | .SH "NAME" | |
23 | sd_journal_get_cutoff_realtime_usec, sd_journal_get_cutoff_monotonic_usec \- Read cut\-off timestamps from the current journal entry | |
24 | .SH "SYNOPSIS" | |
25 | .sp | |
26 | .ft B | |
27 | .nf | |
28 | #include <systemd/sd\-journal\&.h> | |
29 | .fi | |
30 | .ft | |
31 | .HP \w'int\ sd_journal_get_cutoff_realtime_usec('u | |
60f067b4 | 32 | .BI "int sd_journal_get_cutoff_realtime_usec(sd_journal\ *" "j" ", uint64_t\ *" "from" ", uint64_t\ *" "to" ");" |
14228c0d | 33 | .HP \w'int\ sd_journal_get_cutoff_monotonic_usec('u |
60f067b4 | 34 | .BI "int sd_journal_get_cutoff_monotonic_usec(sd_journal\ *" "j" ", sd_id128_t\ " "boot_id" ", uint64_t\ *" "from" ", uint64_t\ *" "to" ");" |
14228c0d MB |
35 | .SH "DESCRIPTION" |
36 | .PP | |
37 | \fBsd_journal_get_cutoff_realtime_usec()\fR | |
5eef597e MP |
38 | retrieves the realtime (wallclock) timestamps of the first and last entries accessible in the journal\&. It takes three arguments: the journal context object |
39 | \fIj\fR | |
40 | and two pointers | |
41 | \fIfrom\fR | |
42 | and | |
43 | \fIto\fR | |
44 | pointing at 64\-bit unsigned integers to store the timestamps in\&. The timestamps are in microseconds since the epoch, i\&.e\&. | |
14228c0d MB |
45 | \fBCLOCK_REALTIME\fR\&. Either one of the two timestamp arguments may be passed as |
46 | \fBNULL\fR | |
47 | in case the timestamp is not needed, but not both\&. | |
48 | .PP | |
49 | \fBsd_journal_get_cutoff_monotonic_usec()\fR | |
5eef597e MP |
50 | retrieves the monotonic timestamps of the first and last entries accessible in the journal\&. It takes three arguments: the journal context object |
51 | \fIj\fR, a 128\-bit identifier for the boot | |
52 | \fIboot_id\fR, and two pointers to 64\-bit unsigned integers to store the timestamps, | |
53 | \fIfrom\fR | |
54 | and | |
55 | \fIto\fR\&. The timestamps are in microseconds since boot\-up of the specific boot, i\&.e\&. | |
14228c0d MB |
56 | \fBCLOCK_MONOTONIC\fR\&. 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 |
57 | \fBsd_id128_get_boot\fR(3) | |
58 | 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 | |
59 | \fBNULL\fR | |
60 | in case the timestamp is not needed, but not both\&. | |
61 | .SH "RETURN VALUE" | |
62 | .PP | |
63 | \fBsd_journal_get_cutoff_realtime_usec()\fR | |
64 | and | |
65 | \fBsd_journal_get_cutoff_monotonic_usec()\fR | |
66 | return 1 on success, 0 if not suitable entries are in the journal or a negative errno\-style error code\&. | |
5eef597e MP |
67 | .PP |
68 | Locations pointed to by parameters | |
69 | \fIfrom\fR | |
70 | and | |
71 | \fIto\fR | |
72 | will be set only if the return value is positive, and obviously, the parameters are non\-null\&. | |
14228c0d MB |
73 | .SH "NOTES" |
74 | .PP | |
75 | The | |
76 | \fBsd_journal_get_cutoff_realtime_usec()\fR | |
77 | and | |
78 | \fBsd_journal_get_cutoff_monotonic_usec()\fR | |
60f067b4 JS |
79 | interfaces are available as a shared library, which can be compiled and linked to with the |
80 | \fBlibsystemd\fR\ \&\fBpkg-config\fR(1) | |
14228c0d MB |
81 | file\&. |
82 | .SH "SEE ALSO" | |
83 | .PP | |
84 | \fBsystemd\fR(1), | |
85 | \fBsd-journal\fR(3), | |
86 | \fBsd_journal_open\fR(3), | |
87 | \fBsd_journal_get_realtime_usec\fR(3), | |
88 | \fBsd_id128_get_boot\fR(3), | |
89 | \fBclock_gettime\fR(2) |