Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

PR

https://github.com/apache/cloudstack/pull/4207

...

This feature adds outputting human readable byte sizes in the management server logs, agent logs, events, and usage records.

Instead of seeing output:
2020-07-23 15:31:58,593 DEBUG [c.c.a.t.Request] (AgentManager-Handler-12:null) (logid:) Seq 8-1863645820801253428: Processing: { Ans: , MgmtId: 52238089807, via: 8, Ver: v1, Flags: 10, [{"com.cloud.agent.api.NetworkUsageAnswer":{"routerName":"r-224-VM","bytesSent":"106496","bytesReceived":"0","result":"true","details":"","wait":"0",}}] }

The KB, MB and GB values will be printed out:

2020-07-23 15:31:58,593 DEBUG [c.c.a.t.Request] (AgentManager-Handler-12:null) (logid:) Seq 8-1863645820801253428: Processing: { Ans: , MgmtId: 52238089807, via: 8, Ver: v1, Flags: 10, [{"com.cloud.agent.api.NetworkUsageAnswer":{"routerName":"r-224-VM","bytesSent":"(104,00 KB) 106496","bytesReceived":"(0 bytes) 0","result":"true","details":"","wait":"0",}}] }

Architecture and Design description

A non-dynamic global setting is added (display.human.readable.sizes) to control switching this feature on and off, it is on by default. This setting is sent to the agent on connection and is only read from the database when the management server is started up.

...