Whamcloud - gitweb
LU-17352 utils: lljobstat can read dumped stats files 97/53397/6
authorLei Feng <flei@whamcloud.com>
Sun, 10 Dec 2023 08:45:38 +0000 (16:45 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 3 Jan 2024 03:03:30 +0000 (03:03 +0000)
commitef2555d7af21bd35756805b13e6b458f56cecf54
treebc9b809f87cfa712d37fb8936718044e3781cc46
parent5c7c0a33a48081a0ebcdc06c123a6ebe868f9d5f
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.

Signed-off-by: Lei Feng <flei@whamcloud.com>
Test-Parameters: trivial
Change-Id: Iee1ce69d2befb9d021e34effd4fc65a47297c1fb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53397
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh
lustre/utils/lljobstat