From owner-svn-src-head@freebsd.org Sun Jun 10 12:28:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A459E101F2A1; Sun, 10 Jun 2018 12:28:19 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 55E187F4EC; Sun, 10 Jun 2018 12:28:19 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 4D6221E271; Sun, 10 Jun 2018 12:28:19 +0000 (UTC) Date: Sun, 10 Jun 2018 12:28:19 +0000 From: Alexey Dokuchaev To: Bruce Evans Cc: Eitan Adler , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r333945 - head/usr.bin/top Message-ID: <20180610122819.GA75055@FreeBSD.org> References: <201805202319.w4KNJ9hj038452@repo.freebsd.org> <20180521094344.Q1053@besplex.bde.org> <20180521063953.GA70671@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180521063953.GA70671@FreeBSD.org> User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jun 2018 12:28:19 -0000 On Mon, May 21, 2018 at 06:39:53AM +0000, Alexey Dokuchaev wrote: > I [...] have to patch top(1) locally to use namelength = 8 and header > format so it neatly looks like this: > > PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND > 844 danfe 2 21 0 114M 38836K select 0 49:39 3.82% Xorg > 5836 danfe 12 20 0 101M 23020K select 0 38:19 2.26% deadbeef > > instead of our ugly, default this: > > vvvv > PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND > 41086 danfe 1 20 0 13280K 3112K CPU1 1 0:00 0.09% top > 751 root 1 20 0 10812K 596K select 2 16:53 0.03% powerd > ^^^^^^^^^^ > The amount of wasted space (shown above) is unjustified IMO. I've just tried the latest top(8). Now it's even worse: vvvvvvv (7, was 4) PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAN 818 root 1 20 0 4484K 2148K select 0 0:01 1.57% moused 995 danfe 2 20 0 94208K 40084K select 1 0:06 0.47% Xorg 1107 danfe 1 20 0 35728K 14544K select 0 0:00 0.05% xterm Notice COMMAN (before it was not truncated) and increased amount of wasted space. If I switch to separate threads mode ('H'), alignment breaks: PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND 818 root 20 0 4484K 2148K select 0 0:01 1.96% moused 995 danfe 20 0 93660K 38912K select 1 0:06 0.57% Xorg{Xorg} 1107 danfe 20 0 35728K 13624K select 0 0:01 0.05% xterm If I press 'T', it says "Displaying tid", but the column name is THR, not TID. This is a bit confusing. Displaying tid THR USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMA 100122 root 1 20 0 4484K 2148K select 0 0:01 0.49% mouse Also, it is COMMA now. Can we please do something about this? I am not calling for "USER PRI" as Bruce had suggested, but "USERNAME PRI" is just about right. Most of the usernames are 8 characters or less. Even if they are longer, it makes more sense to truncate usernames than the column names and, especially, command lines. Thanks, ./danfe