From b24c08c254fff0d3a7a90f143df4e93402a872a3 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Tue, 4 Apr 2006 14:59:51 +0000 Subject: [PATCH] Formatting fixes for 100% usage --- commands/simple/top.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/simple/top.c b/commands/simple/top.c index 826dcfe00..70db7ca51 100644 --- a/commands/simple/top.c +++ b/commands/simple/top.c @@ -146,7 +146,7 @@ void print_procs(int maxlines, qsort(tick_procs, nprocs, sizeof(tick_procs[0]), cmp_ticks); - printf("CPU states: %5.2f%% user, %5.2f%% system, %5.2f%% kernel, %5.2f%% idle", + printf("CPU states: %6.2f%% user, %6.2f%% system, %6.2f%% kernel, %6.2f%% idle", 100.0*(dt-systemticks-kernelticks-idleticks)/dt, 100.0*systemticks/dt, 100.0*kernelticks/dt, @@ -154,7 +154,7 @@ void print_procs(int maxlines, printf("\n\n"); maxlines -= 2; - printf(" PID USERNAME PRI NICE SIZE STATE TIME CPU COMMAND\n"); + printf(" PID USERNAME PRI NICE SIZE STATE TIME CPU COMMAND\n"); maxlines--; for(p = 0; p < nprocs; p++) { int euid = 0; @@ -196,7 +196,7 @@ void print_procs(int maxlines, printf("%6s", pr->p_rts_flags ? "" : "RUN"); printf(" %3d:%02d ", (ticks/HZ/60), (ticks/HZ)%60); - printf("%5.2f%% %s\n", + printf("%6.2f%% %s\n", 100.0*tick_procs[p].ticks/dt, name); } } -- 2.44.0