monitor: Add tick count to error log capture
If the 'count' method of looking for fan faults is configured, add the
tick counts to the fan sensor data capture when an error is created.
While the count will of course be at the max for the failed sensor, it
will show the counts for the other sensors which could help show if
other rotors are having issues but just haven't hit the thresholds yet.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I99a3e2480005244df0a0d2d86a36d6e762304bd7
diff --git a/monitor/system.cpp b/monitor/system.cpp
index 77f3fab..98dcb20 100644
--- a/monitor/system.cpp
+++ b/monitor/system.cpp
@@ -502,6 +502,10 @@
values["prev_targets"] = json(sensor->getPrevTarget()).dump();
}
+ if (sensor->getMethod() == MethodMode::count)
+ {
+ values["ticks"] = sensor->getCounter();
+ }
data["sensors"][sensor->name()] = values;
}
}