From: Ben Gras Date: Tue, 4 Apr 2006 14:59:51 +0000 (+0000) Subject: Formatting fixes for 100% usage X-Git-Tag: v3.1.2a~51 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=b24c08c254fff0d3a7a90f143df4e93402a872a3;p=minix.git Formatting fixes for 100% usage --- 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); } }