Bug 228823 - top(1): misalignment of headers when H is active
Summary: top(1): misalignment of headers when H is active
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Eitan Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-08 08:04 UTC by Trond Endrestøl
Modified: 2018-06-09 02:49 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Trond Endrestøl 2018-06-08 08:04:14 UTC
The field width of the THR column header must be increased by 1 as thread IDs are minimum 6 digits long.

  THR USERNAME      PRI NICE   SIZE    RES   SWAP STATE   C   TIME     CPU COMMAND
100889 trond          20    0 15152K  5568K     0K CPU16  16   0:00   0.20% top

vs

   THR USERNAME      PRI NICE   SIZE    RES   SWAP STATE   C   TIME     CPU COMMAND
100889 trond          20    0 15152K  5568K     0K CPU16  16   0:00   0.20% top
Comment 1 commit-hook freebsd_committer freebsd_triage 2018-06-09 02:47:28 UTC
A commit references this bug:

Author: eadler
Date: Sat Jun  9 02:47:02 UTC 2018
New revision: 334869
URL: https://svnweb.freebsd.org/changeset/base/334869

Log:
  top(1): correct header, align it.

  THR is always 6 digits or longer. Now that the PID/THR change is
  separated, use correct headers.

  PR:		228823
  Reported by:	Trond.Endrestol@ximalas.info

Changes:
  head/usr.bin/top/machine.c