Whamcloud - gitweb
LU-13705 utils: improve llstat/llobdstat usability 78/39178/8
authorAndreas Dilger <adilger@dilger.ca>
Wed, 20 May 2020 06:53:33 +0000 (00:53 -0600)
committerOleg Drokin <green@whamcloud.com>
Wed, 28 Apr 2021 02:10:30 +0000 (02:10 +0000)
commit3e0d994fbf4c4f2e5c51b2be5669ad97aa02f840
treebf3e8715125a00aec3a8fd45ae26a40da806da6e
parentae98601fed3e99af5376311cb4b02d2c65ccd1fe
LU-13705 utils: improve llstat/llobdstat usability

Allow llstat to work on the client with minimal effort, by allowing
client OBD device types like "llstat -i 1 llite" or "llstat -i 1 osc",
in addition to the existing "mdt" or "ost_io" RPC-level shortcuts.

Allow specifying stats with the same syntax as "lctl get_param" and
"lctl list_param" like "llstat -i 5 myth-OST0002" or similar specific
stats.

Make the code and usage between llstat and llobdstat more uniform,
so that it is easier to switch between using one and the other.

Fix the display of llstat to fit into 80 columns by default, but
allow it to detect if the terminal is wider and print more columns
(e.g. stddev) if there are more columns in the terminal. llobdstat
always fit within 80 columns, so this is not necessary there.

Fix llite.*.read_ahead_stats to be usable by llstat.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Change-Id: I09c714018925e8d0a17a63eee673ae18512540e5
Reviewed-on: https://review.whamcloud.com/39178
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/lproc_llite.c
lustre/tests/sanity.sh
lustre/utils/llobdstat
lustre/utils/llstat