]> Zhao Yanbai Git Server - minix.git/commitdiff
Formatting fixes for 100% usage
authorBen Gras <ben@minix3.org>
Tue, 4 Apr 2006 14:59:51 +0000 (14:59 +0000)
committerBen Gras <ben@minix3.org>
Tue, 4 Apr 2006 14:59:51 +0000 (14:59 +0000)
commands/simple/top.c

index 826dcfe0062fbb8505da47958faef07a818bc9f3..70db7ca519f698af0d71fc835e2ad149abe6897a 100644 (file)
@@ -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);
        }
 }