From f363ff4a929325e708227b5f772583111b1cfdb2 Mon Sep 17 00:00:00 2001 From: Lizzy Fleckenstein Date: Thu, 2 Apr 2026 02:31:10 +0200 Subject: pids can have 6 digits --- burstdog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/burstdog.c b/burstdog.c index f39e6a2..54f02de 100644 --- a/burstdog.c +++ b/burstdog.c @@ -262,7 +262,7 @@ int main(int argc, char **argv) bursting = 0; } else if (bursting != proc->pid && proc_share >= BURSTDOG_BURST) { int n_msg = snprintf(msgbuffer, BUFSIZ, - "%s: %5d %s is bursting: %"PRIu64" of %"PRIu64" ticks (%"PRIu64"%% of %ld cores)\n", + "%s: %6d %s is bursting: %"PRIu64" of %"PRIu64" ticks (%"PRIu64"%% of %ld cores)\n", timebuf, proc->pid, proc->name, proc_busy, total, proc_share, nproc); write_all(logfd, msgbuffer, n_msg); bursting = proc->pid; @@ -315,7 +315,7 @@ int main(int argc, char **argv) uint64_t proc_busy = proc->time[0] - proc->time[BURSTDOG_SAMPLES-1]; uint64_t proc_share = nproc * proc_busy * 100 / total; n_msg += snprintf(msgbuffer+n_msg, BUFSIZ > n_msg ? BUFSIZ-n_msg : 0, - "%s: top %zu: %5d %s got: %"PRIu64" of %"PRIu64" ticks (%"PRIu64"%% of %ld cores)\n", + "%s: top %zu: %6d %s got: %"PRIu64" of %"PRIu64" ticks (%"PRIu64"%% of %ld cores)\n", timebuf, i+1, proc->pid, proc->name, proc_busy, total, proc_share, nproc); } n_msg += snprintf(msgbuffer+n_msg, BUFSIZ > n_msg ? BUFSIZ-n_msg : 0, "\n"); -- cgit v1.2.3