From owner-freebsd-current@FreeBSD.ORG Mon Jul 2 15:04:38 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C331106564A for ; Mon, 2 Jul 2012 15:04:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 522418FC1B for ; Mon, 2 Jul 2012 15:04:37 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 205F3B99A; Mon, 2 Jul 2012 11:04:37 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Date: Mon, 2 Jul 2012 10:50:59 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201207010654.58777.erichfreebsdlist@ovitrap.com> In-Reply-To: <201207010654.58777.erichfreebsdlist@ovitrap.com> MIME-Version: 1.0 Message-Id: <201207021050.59694.jhb@freebsd.org> Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 02 Jul 2012 11:04:37 -0400 (EDT) Cc: Erich Dollansky , AN Subject: Re: problem with top X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 15:04:38 -0000 On Saturday, June 30, 2012 7:54:58 pm Erich Dollansky wrote: > Hi, > > On Sunday, July 01, 2012 06:51:41 AM AN wrote: > > FreeBSD FBSD10 10.0-CURRENT FreeBSD 10.0-CURRENT #23 r237852: Sat Jun 30 > > 18:45:27 EDT 2012 root@FBSD10:/usr/obj/usr/src/sys/MYKERNEL amd64 > > > > After a recent upgrade, I am seeing a formatting issue with top. > > > > top -SPH -s 1: > > > > last pid: 26011; load averages: 3.61, 2.80, 1.56 up > > 0+00:23:30 19:48:46 > > 268 processes: 6 running, 245 sleeping, 17 waiting > > CPU 0: 22.0% user, 0.0% nice, 0.8% system, 0.8% interrupt, 76.4% idle > > CPU 16877.6ctive, 2313M Inact, 6.3M Wired, 3 0.8 Cache, 1440M65.4, 7674M > > Free > > CPU 2: 28.3% user, 0.0% nice, 2.4% system, 0.0% interrupt, 69.3% idle > > CPU 3: 36.2% user, 0.0% nice, 1.6% system, 0.0% interrupt, 62.2% idle > > Mem: 455M Active, 2302M Inact, 3151M Wired, 3900K Cache, 1440M Buf, 7943M > > Free > > Swap: 20G Total, 20G Free > > > > > > Seems like the entry for CPU 1 is wrong. > > I also noticed this but thought it is of temporary nature. The data of CPU 1 is getting overwritten by the data of the memory usage. Ah, I think I have found the bug for this, can you try this change: Index: usr.bin/top/machine.c =================================================================== --- machine.c (revision 225593) +++ machine.c (working copy) @@ -263,6 +263,7 @@ update_layout(void) { y_mem = 3; + y_arc = 4; y_swap = 4 + arc_enabled; y_idlecursor = 5 + arc_enabled; y_message = 5 + arc_enabled; @@ -271,7 +272,8 @@ update_layout(void) Header_lines = 7 + arc_enabled; if (pcpu_stats) { - y_mem = ncpus - 1; + y_mem += ncpus - 1; + y_arc += ncpus - 1; y_swap += ncpus - 1; y_idlecursor += ncpus - 1; y_message += ncpus - 1; -- John Baldwin