diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-10-14 05:12:58 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-10-14 05:12:58 +0200 |
commit | c2373f848dddcc1827cf715c5ef778dc8d475761 (patch) | |
tree | 9fccfcaa1846b0aba561d4b5a2bfa26611eb6e3c /src/journal/journalctl.c | |
parent | 161e54f8719c4a11440d762276cbccbeb1736f8c (diff) |
journal: synchronize seqnum across files
Diffstat (limited to 'src/journal/journalctl.c')
-rw-r--r-- | src/journal/journalctl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index bb1f18a21f..a6b6e0fbd6 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -50,6 +50,7 @@ int main(int argc, char *argv[]) { const void *data; size_t length; char *cursor; + uint64_t realtime = 0, monotonic = 0; r = sd_journal_get_cursor(j, &cursor); if (r < 0) { @@ -60,6 +61,13 @@ int main(int argc, char *argv[]) { printf("entry: %s\n", cursor); free(cursor); + sd_journal_get_realtime_usec(j, &realtime); + sd_journal_get_monotonic_usec(j, &monotonic); + printf("realtime: %llu\n" + "monotonic: %llu\n", + (unsigned long long) realtime, + (unsigned long long) monotonic); + SD_JOURNAL_FOREACH_FIELD(j, data, length) printf("\t%.*s\n", (int) length, (const char*) data); } |