Do you know what is the unit
for SoftLayer_Virtual_Guest:getBandwidthDataByDate
?
Bit, byte or Octect?
I found some mismatching between the return value from API
and portal
.
Thanks.
The method that you are using will return an "average: bandwith usage, but the portal uses another method which returns a "sum" value. So the values will not be the same, but they will nearly.
Another thing to point out is that the API does not return bytes/per second, it returns the bytes used by the interface in a peiod of time. what I can see in your result of the api is that period of time is 5 minutes.
so let's convert the data with that information:
646793.0 bytes in 5 minutes
converting to bytes per second (5 minutes = 300 seconds) 646793.0/300 = 2155.976 bytes/second
converting to bits 2155.976 * 8 = 17247.808
converting to kilo bits (note we are not using 1024 ) 17247.808 / 1000 = 17.247 KB/s
As I told you the value is closer, but not the same due to the method used if you are looking the exact value you have to use the getSummaryData method. here an example in java Getting bandWidth data in SL
Regards