svn commit: r333945 - head/usr.bin/top
Alexey Dokuchaev
danfe at FreeBSD.org
Sun Jun 10 12:28:19 UTC 2018
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
More information about the svn-src-head
mailing list