Whamcloud - gitweb
LU-17352 utils: lljobstat can read dumped stats files
authorLei Feng <flei@whamcloud.com>
Sun, 10 Dec 2023 08:45:38 +0000 (16:45 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 6 Jan 2024 08:21:52 +0000 (08:21 +0000)
commitf29012b05eadd62c0de1d7ec2cdbf4dea0a35abb
tree735a1bd1f8eb465fcac17a5b0fbca5d5854bae03
parentbe89bacf76840b0afd8fd9d96dc410a3e5951ef3
LU-17352 utils: lljobstat can read dumped stats files

Improve lljobstat command to read dumped stats file.
Usually the file is generated by command:
  lctl get_param *.*.job_stats > all_job_stats.txt

Multiple files can be specified with multiple --statsfile
options. For example:
  lljobstat --statsfile=1.txt --statsfile=2.txt

Stats data from multiple files will be added up and
sorted. Then the top jobs will be listed.

Try to use CLoader to accelerate the YAML parsing.

Handle SIGINT and exit silently if lljobstat is in the loop
of reading system job_stats files periodically.

Fix a bug when the job_id is a pure number.

Lustre-change: https://review.whamcloud.com/53397
Lustre-commit: ef2555d7af21bd35756805b13e6b458f56cecf54

Signed-off-by: Lei Feng <flei@whamcloud.com>
Test-Parameters: trivial
Change-Id: Iee1ce69d2befb9d021e34effd4fc65a47297c1fb
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53582
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/tests/sanity.sh
lustre/utils/lljobstat