Skip to content

Commit f77ce82

Browse files
committed
Address review comments from Will
1 parent 4328212 commit f77ce82

File tree

4 files changed

+95
-0
lines changed

4 files changed

+95
-0
lines changed

lustre-collector/src/fixtures/osd_active.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ osd-ldiskfs.MGS.filesfree=130871
1010
osd-ldiskfs.ai400x2-MDT0000.filesfree=97713887
1111
osd-ldiskfs.ai400x2-OST0000.filesfree=1073740846
1212
osd-ldiskfs.ai400x2-OST0001.filesfree=1073740847
13+
osd-ldiskfs.ai400x2-OST0001.stats=
14+
snapshot_time 1750226041.107629473 secs.nsecs
15+
start_time 1750176720.390243856 secs.nsecs
16+
elapsed_time 49320.717385617 secs.nsecs
17+
get_page 375 samples [usecs] 1 23 2956 28656
18+
cache_access 297 samples [pages] 830 1024 303934
19+
cache_hit 123 samples [pages] 0 1024 303934
20+
cache_miss 297 samples [pages] 830 1024 303934
1321
osd-ldiskfs.MGS.filestotal=131072
1422
osd-ldiskfs.ai400x2-MDT0000.filestotal=97714176
1523
osd-ldiskfs.ai400x2-OST0000.filestotal=1073741824

lustre-collector/src/osd_parser.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ enum OsdStat {
6464
KBytesTotal(u64),
6565
BrwStats(Vec<BrwStats>),
6666
QuotaStats(QuotaStatsOsd),
67+
/// Generic OSD statistics (performance counters, operation counts)
6768
Stats(Vec<Stat>),
6869
}
6970

lustre-collector/src/snapshots/lustre_collector__osd_parser__tests__osd_active_stats.snap

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,83 @@ expression: result
137137
},
138138
),
139139
),
140+
Target(
141+
Stats(
142+
TargetStat {
143+
kind: Ost,
144+
param: Param(
145+
"stats",
146+
),
147+
target: Target(
148+
"ai400x2-OST0001",
149+
),
150+
value: [
151+
Stat {
152+
name: "get_page",
153+
units: "usecs",
154+
samples: 375,
155+
min: Some(
156+
1,
157+
),
158+
max: Some(
159+
23,
160+
),
161+
sum: Some(
162+
2956,
163+
),
164+
sumsquare: Some(
165+
28656,
166+
),
167+
},
168+
Stat {
169+
name: "cache_access",
170+
units: "pages",
171+
samples: 297,
172+
min: Some(
173+
830,
174+
),
175+
max: Some(
176+
1024,
177+
),
178+
sum: Some(
179+
303934,
180+
),
181+
sumsquare: None,
182+
},
183+
Stat {
184+
name: "cache_hit",
185+
units: "pages",
186+
samples: 123,
187+
min: Some(
188+
0,
189+
),
190+
max: Some(
191+
1024,
192+
),
193+
sum: Some(
194+
303934,
195+
),
196+
sumsquare: None,
197+
},
198+
Stat {
199+
name: "cache_miss",
200+
units: "pages",
201+
samples: 297,
202+
min: Some(
203+
830,
204+
),
205+
max: Some(
206+
1024,
207+
),
208+
sum: Some(
209+
303934,
210+
),
211+
sumsquare: None,
212+
},
213+
],
214+
},
215+
),
216+
),
140217
Target(
141218
FilesTotal(
142219
TargetStat {

lustrefs-exporter/fixtures/stats.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3024,6 +3024,15 @@
30243024
"sum": 303934,
30253025
"sumsquare": null
30263026
},
3027+
{
3028+
"name": "cache_hits",
3029+
"units": "pages",
3030+
"samples": 2810,
3031+
"min": 830,
3032+
"max": 2956,
3033+
"sum": 28656,
3034+
"sumsquare": null
3035+
},
30273036
{
30283037
"name": "many_credits",
30293038
"units": "reqs",

0 commit comments

Comments
 (0)