Whamcloud - gitweb
LU-13705 utils: improve llstat/llobdstat usability
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 5 Aug 2021 22:32:13 +0000 (16:32 -0600)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 13 Aug 2021 00:55:10 +0000 (00:55 +0000)
commitf47190279e659ec20f781814dd0ed5b87800ac5f
tree36dc062bbe164dff717db1f82e387bc15111a49d
parent14ae2c782d6f8b580e56ebe4cad12c5fb71d1f4c
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.

Lustre-change: https://review.whamcloud.com/39178
Lustre-commit: 3e0d994fbf4c4f2e5c51b2be5669ad97aa02f840

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