[systemd-devel] [PATCH 09/17] journalctl: print monotonic timestamp in --header

Lennart Poettering lennart at poettering.net
Mon Jun 10 02:10:52 PDT 2013


On Sat, 08.06.13 00:22, Zbigniew Jędrzejewski-Szmek (zbyszek at in.waw.pl) wrote:

> ---
>  src/journal/journal-file.c    |  6 ++++--
>  src/journal/journald-server.c | 19 +++----------------
>  2 files changed, 7 insertions(+), 18 deletions(-)
> 
> diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
> index 073e4a4..b3c9a92 100644
> --- a/src/journal/journal-file.c
> +++ b/src/journal/journal-file.c
> @@ -2294,6 +2294,7 @@ void journal_file_print_header(JournalFile *f) {
>                 "Tail Sequential Number: %"PRIu64"\n"
>                 "Head Realtime Timestamp: %s\n"
>                 "Tail Realtime Timestamp: %s\n"
> +               "Tail Monotonic Timestamp: %5llu.%06llu s\n"
>                 "Objects: %"PRIu64"\n"
>                 "Entry Objects: %"PRIu64"\n",
>                 f->path,
> @@ -2317,6 +2318,8 @@ void journal_file_print_header(JournalFile *f) {
>                 le64toh(f->header->tail_entry_seqnum),
>                 format_timestamp(x, sizeof(x), le64toh(f->header->head_entry_realtime)),
>                 format_timestamp(y, sizeof(y), le64toh(f->header->tail_entry_realtime)),
> +               le64toh(f->header->tail_entry_monotonic) / USEC_PER_SEC,
> +               le64toh(f->header->tail_entry_monotonic) %
> USEC_PER_SEC,

We really should use format_timespan for this, no?

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list