0

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.

mcruz
  • 1,534
  • 2
  • 11
  • 14
April
  • 7
  • 1

3 Answers3

0

If I'm not wrong, it is in bytes per second.

0

Here I added an example for April's question.

Portal Bandwidth Graph

I got the datas by SoftLayer_Virtual_Guest:getBandwidthDataByDate.

getBandwidthDataByDate's output

It showed that 'counter': 646793.0, if the "unit" is bytes per sec, 646793.0Bps*8/1024 != 16.62Kbps

ChrisM
  • 1
  • 1
0

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

Community
  • 1
  • 1