Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Apr 2005 14:03:21 +0300
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Dag-Erling Sm?rgrav <des@des.no>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.bin/top machine.c
Message-ID:  <20050417110321.GA78636@gothmog.gr>
In-Reply-To: <863btq4k9m.fsf@xps.des.no>
References:  <200504161543.j3GFhclO075103@repoman.freebsd.org> <86acnyd2k7.fsf@xps.des.no> <20050416191436.G68941@fledge.watson.org> <863btq4k9m.fsf@xps.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2005-04-16 21:03, Dag-Erling Sm?rgrav <des@des.no> wrote:
>Robert Watson <rwatson@FreeBSD.org> writes:
>> The 'C' column is quite useful when tuning SMP systems, and something
>> I frequently look at when debugging performance issues in 5.x and
>> 6.x.
>
> The C column is pointless when you're not showing individual threads,
> since different threads in the same process might be running
> simultaneously on different CPUs.

That's probably I could manage to do later today or tomorrow.  For the
moment, how does the following change look (change of NICE to NIC and
removal of CPU column)?

For those whose mailers may mess whitespace, the diff is also available
online at:
http://people.freebsd.org/~keramida/diff/top.nic+wpcu.diff

%%%
Index: machine.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/top/machine.c,v
retrieving revision 1.71
diff -u -r1.71 machine.c
--- machine.c	16 Apr 2005 15:43:38 -0000	1.71
+++ machine.c	17 Apr 2005 10:55:36 -0000
@@ -103,20 +103,20 @@
 	"%5d %-*.*s %6ld %6ld %6ld %6ld %6ld %6ld %6.2f%% %.*s"
 
 static char smp_header_thr[] =
-	"  PID %-*.*s  THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU    CPU COMMAND";
+	"  PID %-*.*s  THR PRI NIC   SIZE    RES STATE  C   TIME   WCPU COMMAND";
 static char smp_header[] =
-	"  PID %-*.*s "   "PRI NICE   SIZE    RES STATE  C   TIME   WCPU    CPU COMMAND";
+	"  PID %-*.*s "   "PRI NIC   SIZE    RES STATE  C   TIME   WCPU COMMAND";
 
 #define smp_Proc_format \
-	"%5d %-*.*s %s%3d %4d%7s %6s %-6.6s %1x%7s %5.2f%% %5.2f%% %.*s"
+	"%5d %-*.*s %s%3d %3d%7s %6s %-6.6s %1x%7s %5.2f%% %.*s"
 
 static char up_header_thr[] =
-	"  PID %-*.*s  THR PRI NICE   SIZE    RES STATE    TIME   WCPU    CPU COMMAND";
+	"  PID %-*.*s  THR PRI NIC   SIZE    RES STATE    TIME   WCPU COMMAND";
 static char up_header[] =
-	"  PID %-*.*s "   "PRI NICE   SIZE    RES STATE    TIME   WCPU    CPU COMMAND";
+	"  PID %-*.*s "   "PRI NIC   SIZE    RES STATE    TIME   WCPU COMMAND";
 
 #define up_Proc_format \
-	"%5d %-*.*s %s%3d %4d%7s %6s %-6.6s%.0d%7s %5.2f%% %5.2f%% %.*s"
+	"%5d %-*.*s %s%3d %3d%7s %6s %-6.6s%.0d%7s %5.2f%% %.*s"
 
 
 /* process state names for the "STATE" column of the display */
@@ -781,7 +781,6 @@
 	    smpmode ? pp->ki_lastcpu : 0,
 	    format_time(cputime),
 	    100.0 * weighted_cpu(pct, pp),
-	    100.0 * pct,
 	    screen_width > cmdlengthdelta ?
 	    screen_width - cmdlengthdelta :
 	    0,
%%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050417110321.GA78636>