Skip to content

Commit a77b8ed

Browse files
committed
quikfix error in mpstat stats
1 parent eb63462 commit a77b8ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ros2_system_monitor/cpu_monitor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ def check_mpstat(self):
303303
system = lst[5]
304304

305305
core_level = DiagnosticStatus.OK
306-
usage = (float(user)+float(nice))*1e-2
306+
usage = (float(user.rstrip(',').replace(',', '.'))+float(nice.rstrip(',').replace(',', '.')))*1e-2
307307
if usage > 10.0: # wrong reading, use old reading instead
308308
self.get_logger().warning(
309309
f"Read CPU usage of {usage} percent. "

0 commit comments

Comments
 (0)