8000 Add new 'block maps msec' brw_stats by RDruon · Pull Request #70 · whamcloud/lustre-collector · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on May 21, 2024. It is now read-only.

Add new 'block maps msec' brw_stats #70

Merged
merged 3 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Scrapes Lustre stats and aggregates into JSON or YAML"
edition = "2021"
license = "MIT"
name = "lustre_collector"
version = "0.7.4"
version = "0.7.5"

[dependencies]
clap = {version = "4", features = ["derive"]}
Expand Down
26 changes: 26 additions & 0 deletions fixtures/osd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,29 @@ I/O time (1/1000s) ios % cum % | ios % cum %

read | write
disk I/O size ios % cum % | ios % cum %
osd-ldiskfs.exa01-OST0013.brw_stats=
snapshot_time: 1698140569.773721492 secs.nsecs

read | write
pages per bulk r/w rpcs % cum % | rpcs % cum %

read | write
discontiguous pages rpcs % cum % | rpcs % cum %

read | write
discontiguous blocks rpcs % cum % | rpcs % cum %

read | write
disk fragmented I/Os ios % cum % | ios % cum %

read | write
disk I/Os in flight ios % cum % | ios % cum %

read | write
I/O time (1/1000s) ios % cum % | ios % cum %

read | write
disk I/O size ios % cum % | ios % cum %

read | write
block maps msec maps % cum % | maps % cum %
1 change: 1 addition & 0 deletions src/brw_stats_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ where
attempt(string_to("disk I/Os in flight", "rpc_hist")),
attempt(string_to("I/O time (1/1000s)", "io_time")),
attempt(string_to("disk I/O size", "disk_iosize")),
attempt(string_to("block maps msec", "block_maps_msec")),
]);

(keys.skip(spaces()), word().skip(till_newline())).map(|(name, unit)| BrwStats {
Expand Down
2 changes: 1 addition & 1 deletion src/mgs/mgs_fs_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ where
let mgs_map: HashMap<Target, Vec<FsName>> =
xs.into_iter()
.fold(HashMap::new(), |mut acc, (target, fs_name)| {
let fs_names = acc.entry(target.clone()).or_insert_with(Vec::new);
let fs_names = acc.entry(target.clone()).or_default();
let names: Vec<FsName> = [&fs_names[..], &vec![fs_name][..]].concat();
acc.insert(target, names);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,61 @@ expression: result
},
),
),
Target(
BrwStats(
TargetStat {
kind: Ost,
param: Param(
"brw_stats",
),
target: Target(
"exa01-OST0013",
),
value: [
BrwStats {
name: "pages",
unit: "rpcs",
buckets: [],
},
BrwStats {
name: "discont_pages",
unit: "rpcs",
buckets: [],
},
BrwStats {
name: "discont_blocks",
unit: "rpcs",
buckets: [],
},
BrwStats {
name: "dio_frags",
unit: "ios",
buckets: [],
},
BrwStats {
name: "rpc_hist",
unit: "ios",
buckets: [],
},
BrwStats {
name: "io_time",
unit: "ios",
buckets: [],
},
BrwStats {
name: "disk_iosize",
unit: "ios",
buckets: [],
},
BrwStats {
name: "block_maps_msec",
unit: "maps",
buckets: [],
},
],
},
),
),
],
"",
)
0