svn commit: r251630 - head/usr.bin/top

John Baldwin jhb at FreeBSD.org
Tue Jun 11 19:05:30 UTC 2013


Author: jhb
Date: Tue Jun 11 19:05:29 2013
New Revision: 251630
URL: http://svnweb.freebsd.org/changeset/base/251630

Log:
  Bump the CPU/WCPU column width by one so that it fits values from 100% up
  to 999.99% CPU.  It still won't be aligned if you have a multithreaded
  process using more than 1000% CPU (e.g. idle process on an idle 12-way
  system), but 100% is a common case.
  
  Submitted by:	Jeremy Chadwick (partial)
  MFC after:	1 week

Modified:
  head/usr.bin/top/machine.c

Modified: head/usr.bin/top/machine.c
==============================================================================
--- head/usr.bin/top/machine.c	Tue Jun 11 19:02:36 2013	(r251629)
+++ head/usr.bin/top/machine.c	Tue Jun 11 19:05:29 2013	(r251630)
@@ -107,20 +107,20 @@ static char io_header[] =
     "%5d%s %-*.*s %6ld %6ld %6ld %6ld %6ld %6ld %6.2f%% %.*s"
 
 static char smp_header_thr[] =
-    "  PID%s %-*.*s  THR PRI NICE   SIZE    RES STATE   C   TIME %6s COMMAND";
+    "  PID%s %-*.*s  THR PRI NICE   SIZE    RES STATE   C   TIME %7s COMMAND";
 static char smp_header[] =
-    "  PID%s %-*.*s "   "PRI NICE   SIZE    RES STATE   C   TIME %6s COMMAND";
+    "  PID%s %-*.*s "   "PRI NICE   SIZE    RES STATE   C   TIME %7s COMMAND";
 
 #define smp_Proc_format \
-    "%5d%s %-*.*s %s%3d %4s%7s %6s %-6.6s %2d%7s %5.2f%% %.*s"
+    "%5d%s %-*.*s %s%3d %4s%7s %6s %-6.6s %2d%7s %6.2f%% %.*s"
 
 static char up_header_thr[] =
-    "  PID%s %-*.*s  THR PRI NICE   SIZE    RES STATE    TIME %6s COMMAND";
+    "  PID%s %-*.*s  THR PRI NICE   SIZE    RES STATE    TIME %7s COMMAND";
 static char up_header[] =
-    "  PID%s %-*.*s "   "PRI NICE   SIZE    RES STATE    TIME %6s COMMAND";
+    "  PID%s %-*.*s "   "PRI NICE   SIZE    RES STATE    TIME %7s COMMAND";
 
 #define up_Proc_format \
-    "%5d%s %-*.*s %s%3d %4s%7s %6s %-6.6s%.0d%7s %5.2f%% %.*s"
+    "%5d%s %-*.*s %s%3d %4s%7s %6s %-6.6s%.0d%7s %6.2f%% %.*s"
 
 
 /* process state names for the "STATE" column of the display */


More information about the svn-src-all mailing list