cvs commit: src/usr.bin/top machine.c
Giorgos Keramidas
keramida at ceid.upatras.gr
Sun Apr 17 04:03:34 PDT 2005
On 2005-04-16 21:03, Dag-Erling Sm?rgrav <des at des.no> wrote:
>Robert Watson <rwatson at 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,
%%%
More information about the cvs-src
mailing list