diff options
author | Eitan Adler <eadler@FreeBSD.org> | 2018-08-08 06:31:46 +0000 |
---|---|---|
committer | Eitan Adler <eadler@FreeBSD.org> | 2018-08-08 06:31:46 +0000 |
commit | 550ddd16edafab3c528960de991b4e370939d647 (patch) | |
tree | ece62734f18c07280485fa3ee47e639619fca98e /usr.bin/top | |
parent | 3dc1c7d6bc5ee778e53060584c1ad1a3ff6fa3c2 (diff) | |
download | src-550ddd16edafab3c528960de991b4e370939d647.tar.gz src-550ddd16edafab3c528960de991b4e370939d647.zip |
top(1): hide THR column in separate-thread mode.
It does not make sense to show a "thread count" column when displaying
threads separately. In fact we don't, but do show the header for this
column. Fix this.
Notes
Notes:
svn path=/head/; revision=337448
Diffstat (limited to 'usr.bin/top')
-rw-r--r-- | usr.bin/top/machine.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 4fd27c757957..87ec5bf68977 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -388,7 +388,10 @@ format_header(const char *uname_field) sbuf_printf(header, "%*s", ps.jail ? TOP_JID_LEN : 0, ps.jail ? " JID" : ""); sbuf_printf(header, " %-*.*s ", namelength, namelength, uname_field); - sbuf_cat(header, "THR PRI NICE SIZE RES "); + if (!ps.thread) { + sbuf_cat(header, "THR "); + } + sbuf_cat(header, "PRI NICE SIZE RES "); if (ps.swap) { sbuf_printf(header, "%*s ", TOP_SWAP_LEN - 1, "SWAP"); } |