Reading IO stats fails because the IO read/write bytes are
being converted to strings, then added to a numeric running
total.
Fix this by converting IO stats to integers.
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cpu_usage = str(statinfo["CPU usage"]).strip('% \n\r')
if "IO write_bytes" in statinfo:
- disk_io = disk_io + str(statinfo["IO write_bytes"]).strip('% \n\r')
+ disk_io = disk_io + int(statinfo["IO write_bytes"].strip('% \n\r'))
if "IO read_bytes" in statinfo:
- disk_io = disk_io + str(statinfo["IO read_bytes"]).strip('% \n\r')
+ disk_io = disk_io + int(statinfo["IO read_bytes"].strip('% \n\r'))
if "Started" in statinfo:
started = str(statinfo["Started"]).strip('% \n\r')