From owner-svn-src-head@freebsd.org Tue Aug 8 14:15:20 2017 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3186DB6028; Tue, 8 Aug 2017 14:15:20 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D809463E0A; Tue, 8 Aug 2017 14:15:18 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id d0a43a1c; Tue, 8 Aug 2017 16:15:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=j90AO2uKb8a+TCyvXumjW/Lu9rw=; b=HIF8HbVeVNSIxXLEatRPHBxjcqBL r/PHGQTLckdR5dPCfYd7DXsDiaBqPCgQ78nH9X1IUs3kp7BUGtpGmyyhovhluLFx JmPcviDV0gzMJ+fqLVumzrGMTjgehgp5TWsDsbUXTgMCRjXE/rayDHDn7hl58c85 7+wh3Yuow2Y8oNc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=HArmG9I3ADKaIJBP7SzK9MHSgD/JX5cqMuS6KbibH1+d70WywW2EwRf5 fe4d1sNNkGujjVDkeI8IEV6GH+CPwqNHHxYek9fCiuXaEt5R0n8nrfW/GgXWG0Lj 675qQbqC2EoFLl4oaubXh0CQHGHpweroMOjyV8atb2rjxqeJhDQ= Received: from arcadia (evadot.gandi.net [217.70.181.36]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 84b4059f TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Tue, 8 Aug 2017 16:15:09 +0200 (CEST) Date: Tue, 8 Aug 2017 16:15:07 +0200 From: Emmanuel Vadot <manu@bidouilliste.com> To: Bruce Evans <brde@optusnet.com.au> Cc: Emmanuel Vadot <manu@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r322252 - head/usr.bin/vmstat Message-Id: <20170808161507.2d185d394dc921eac6729d89@bidouilliste.com> In-Reply-To: <20170808225104.I3528@besplex.bde.org> References: <201708081218.v78CIBvL068413@repo.freebsd.org> <20170808225104.I3528@besplex.bde.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 08 Aug 2017 14:15:21 -0000 On Tue, 8 Aug 2017 23:55:52 +1000 (EST) Bruce Evans <brde@optusnet.com.au> wrote: > On Tue, 8 Aug 2017, Emmanuel Vadot wrote: > > > Log: > > vmstat: Always emit a space after the free-memory column > > > > When displaying in non-human form, if the free-memory number > > is large (more than 7 digits), there is no space between it and > > the page fault column. > > > > PR: 221290 > > Submitted by: Josuah Demangeon <mail@josuah.net> (Original version) > > > > Modified: > > head/usr.bin/vmstat/vmstat.c > > > > Modified: head/usr.bin/vmstat/vmstat.c > > ============================================================================== > > --- head/usr.bin/vmstat/vmstat.c Tue Aug 8 11:49:36 2017 (r322251) > > +++ head/usr.bin/vmstat/vmstat.c Tue Aug 8 12:18:11 2017 (r322252) > > @@ -832,6 +832,7 @@ dovmstat(unsigned int interval, int reps) > > xo_emit(" "); > > xo_emit("{:free-memory/%7d}", > > vmstat_pgtok(total.t_free)); > > + xo_emit(" "); > > } > > xo_emit("{:total-page-faults/%5lu} ", > > (unsigned long)rate(sum.v_vm_faults - > > This seems to break the formatting. There was a negative amount of space > available for expansion, and since the header was not expanded to match > its alignment with the fields is more random than before. With -h, the > width was 80 columns, giving ugly line wrap on 80-column terminals with > auto-wrap. Now it is 81 columns, giving uglier line wrap on all 80- > column terminals. This break nothing, This was the case before too (with or without -h), just tested in tmux with force-width 80. > The bugs were mostly in the first line of the header: > - the second line of the header was correct for vmstat -h > - for vmstat without -h, the second line of the header was apparently broken > by a change like the one here, that added a space after the "r b w" fields > without adding one in the "r b w" header > - most of the fields in the first line of the header are misaligned with the > second lone. Many have drifted 3 to the left of where the were in a sort > of center-justified place. Some of these might have actually been > intended to be left justified, but had an off by +1 error. Now these > have an error of off by -2 relative to left justifications. > > Only the "memory" header in the first line is better than in old versions. > It is now left justified. Left justifying all headers in the first line > is probably best. I couldn't find a good way to delimit the right hand > side of the extents of the headers in the first line. The second line of > the headers already uses right justification consistently and this works > well. > > Bruce I think that all this might be true but you might talk about the whole libxo conversion that was done, not my commit right ? -- Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>