Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jun 2018 08:56:24 -0700
From:      Eitan Adler <eadler@freebsd.org>
To:        Alexey Dokuchaev <danfe@freebsd.org>
Cc:        Bruce Evans <brde@optusnet.com.au>, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers <src-committers@freebsd.org>
Subject:   Re: svn commit: r333945 - head/usr.bin/top
Message-ID:  <CAF6rxgnvrsPRvL1dqFu6Pb6p8sszbzXEOaU6YHKZ5FCSn8g9hw@mail.gmail.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10 June 2018 at 05:28, Alexey Dokuchaev <danfe@freebsd.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF6rxgnvrsPRvL1dqFu6Pb6p8sszbzXEOaU6YHKZ5FCSn8g9hw>