Skip to content

Commit

Permalink
IH-543: guard against buggy firmware
Browse files Browse the repository at this point in the history
There are reports of buggy firmware returning 0 ort65535 Watts.
Guard against these by declaring min/max
 (although xcp-rrdd doesn't actually correctly ignore these yet, but that is a separate bug to be fixed).

Signed-off-by: Edwin Török <[email protected]>
  • Loading branch information
edwintorok committed Apr 15, 2024
1 parent 63826ac commit c58ff84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ocaml/xcp-rrdd/bin/rrdp-dcmi/rrdp_dcmi.ml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ let gen_dcmi_power_reading value =
( Rrd.Host
, Ds.ds_make ~name:"DCMI-power-reading"
~description:"Host power usage reported by IPMI DCMI"
~value:(Rrd.VT_Int64 value) ~ty:Rrd.Gauge ~default:true ~units:"W" ~min:0.
~value:(Rrd.VT_Int64 value) ~ty:Rrd.Gauge ~default:true ~units:"W" ~min:1. ~max:65534.
()
)

Expand Down

0 comments on commit c58ff84

Please sign in to comment.