Skip to content

Commit

Permalink
oomkill: Remove extra trailing newline from output
Browse files Browse the repository at this point in the history
Signed-off-by: Hengqi Chen <[email protected]>
  • Loading branch information
chenhengqi committed Aug 6, 2022
1 parent 0e29f70 commit 1d68595
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libbpf-tools/oomkill.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ static void handle_event(void *ctx, int cpu, void *data, __u32 data_sz)
strftime(ts, sizeof(ts), "%H:%M:%S", tm);

if (n)
printf("%s Triggered by PID %d (\"%s\"), OOM kill of PID %d (\"%s\"), %lld pages, loadavg: %s\n",
printf("%s Triggered by PID %d (\"%s\"), OOM kill of PID %d (\"%s\"), %lld pages, loadavg: %s",
ts, e->fpid, e->fcomm, e->tpid, e->tcomm, e->pages, buf);
else
printf("%s Triggered by PID %d (\"%s\"), OOM kill of PID %d (\"%s\"), %lld pages\n",
ts, e->fpid, e->fcomm, e->tpid, e->tcomm, e->pages);
ts, e->fpid, e->fcomm, e->tpid, e->tcomm, e->pages);
}

static void handle_lost_events(void *ctx, int cpu, __u64 lost_cnt)
Expand Down

0 comments on commit 1d68595

Please sign in to comment.