]> git.ipfire.org Git - thirdparty/util-linux.git/commit
irqtop: add -c/--cpu-stat option
authorzhenwei pi <pizhenwei@bytedance.com>
Wed, 10 Nov 2021 03:16:42 +0000 (11:16 +0800)
committerKarel Zak <kzak@redhat.com>
Wed, 10 Nov 2021 09:35:50 +0000 (10:35 +0100)
commit17f7caa45105f0cbf8bf9b562468fba2c5d4a549
treeabeaa13aa4e7764613614ac8846fee25b0fd63bb
parentb1c137a948e0c935bc3fae0303d48a34a3c91e1e
irqtop: add -c/--cpu-stat option

Since a23aecc1bf("irqtop: add per-cpu stats"), irqtop always shows
per-cpu stats. Test on a modern AMD server with 2 socket(256 CPU),
irqtop shows messy output with too many columns.

In this patch, add -c/--cpu-stat option to enable/disable per-cpu stats.
And 'auto' option auto-detect window size, only show per-cpu stats
if the length of per-cpu stats is shorter than the width of window.

[kzak@redhat.com: - shorten the commit message
                  - rename --cpu to --cpu-stat
                  - use scols_table_enable_nowrap() rather than trim in irqtop.c
                  - reduce --help for the new option]

Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
bash-completion/irqtop
sys-utils/irqtop.1.adoc
sys-utils/irqtop.c