From owner-svn-src-all@freebsd.org Sun Jun 10 15:56:56 2018 Return-Path: Delivered-To: svn-src-all@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 90CCE101C93C for ; Sun, 10 Jun 2018 15:56:56 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3EE1C69577 for ; Sun, 10 Jun 2018 15:56:56 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from mail-yb0-f181.google.com (mail-yb0-f181.google.com [209.85.213.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: eadler) by smtp.freebsd.org (Postfix) with ESMTPSA id 098B4B62E for ; Sun, 10 Jun 2018 15:56:56 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: by mail-yb0-f181.google.com with SMTP id d123-v6so5917140ybh.9 for ; Sun, 10 Jun 2018 08:56:56 -0700 (PDT) X-Gm-Message-State: APt69E0QvfzfaB2ninwwOHTunKjoeHpT29k862jGimq+yZtStdhHJVqb rKqZkaa4BzjVOBDLF+bPNtOxASguPbUzmLg4wolndg== X-Google-Smtp-Source: ADUXVKJwHL7diGwZc4qio6hVASFXUMqKH0Venp+3rk4Zpc6F2JZ9Omeqq+nFOX1pQhBG0A12dI0CuFP01i06krIaotc= X-Received: by 2002:a25:500a:: with SMTP id e10-v6mr8528462ybb.87.1528646215452; Sun, 10 Jun 2018 08:56:55 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:ef50:0:0:0:0:0 with HTTP; Sun, 10 Jun 2018 08:56:24 -0700 (PDT) In-Reply-To: <20180610122819.GA75055@FreeBSD.org> References: <201805202319.w4KNJ9hj038452@repo.freebsd.org> <20180521094344.Q1053@besplex.bde.org> <20180521063953.GA70671@FreeBSD.org> <20180610122819.GA75055@FreeBSD.org> From: Eitan Adler Date: Sun, 10 Jun 2018 08:56:24 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333945 - head/usr.bin/top To: Alexey Dokuchaev Cc: Bruce Evans , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jun 2018 15:56:56 -0000 On 10 June 2018 at 05:28, Alexey Dokuchaev wrote: > 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. FWIW I have not forgotten about this. I am planning on completely rewriting how the header, and data, get displayed so its low my priority (pun intended) list to fix this specific case until then. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams