Skip to content

Commit d6d697f

Browse files
author
Jon Ludlam
committed
Merge pull request #992 from siddharthv/CA-89875
CA-89875: RRDD skips reading "/local/domain/0/data/meminfo_free"
2 parents e0b0a89 + a7610a9 commit d6d697f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ocaml/rrdd/rrdd_main.ml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,8 @@ let update_memory xc doms =
240240
)) memory_target_opt
241241
in
242242
let other_ds =
243+
if domid = 0 then None
244+
else begin
243245
try
244246
let memfree_xs_key = Printf.sprintf "/local/domain/%d/data/meminfo_free" domid in
245247
let mem_free = with_xs (fun xs -> Int64.of_string (xs.Xs.read memfree_xs_key)) in
@@ -250,6 +252,7 @@ let update_memory xc doms =
250252
~value:(Rrd.VT_Int64 mem_free) ~ty:Rrd.Gauge ~min:0.0 ~default:true ()
251253
)
252254
with _ -> None
255+
end
253256
in
254257
main_mem_ds :: (Opt.to_list other_ds) @ (Opt.to_list mem_target_ds) @ acc
255258
) [] doms

0 commit comments

Comments
 (0)