SoftLayer_Virtual_Guest:getBandwidthDataByDate的单位是什么
What is the unit for SoftLayer_Virtual_Guest:getBandwidthDataByDate
你知道 SoftLayer_Virtual_Guest:getBandwidthDataByDate
的 unit
是什么吗?
位、字节还是八位字节?
我发现 API
和 portal
的 return 值有些不匹配。
谢谢。
如果我没记错的话,它是每秒字节数。
这里我为 April 的问题添加了一个例子。
我通过 SoftLayer_Virtual_Guest:getBandwidthDataByDate 获得了数据。
getBandwidthDataByDate's output
显示'counter':646793.0,如果"unit"是每秒字节数,646793.0Bps*8/1024 != 16.62Kbps
您使用的方法将 return 一个 "average: bandwith usage, but the portal uses another method which returns a "sum" 值。因此这些值将不相同,但它们将接近。
另外需要指出的是API不是returnbytes/per秒,它是return一段时间内接口使用的字节数.我在你的 api 结果中看到的是那段时间是 5 分钟。
所以让我们用该信息转换数据:
5 分钟内 646793.0 字节
转换为每秒字节数(5 分钟 = 300 秒)
646793.0/300 = 2155.976 bytes/second
转换为位
2155.976 * 8 = 17247.808
转换为千位(注意我们没有使用 1024 )
17247.808 / 1000 = 17.247 KB/s
正如我告诉您的那样,该值更接近,但由于所使用的方法不同,如果您正在寻找必须使用 getSummaryData 方法的确切值。这是 java
中的示例
此致
你知道 SoftLayer_Virtual_Guest:getBandwidthDataByDate
的 unit
是什么吗?
位、字节还是八位字节?
我发现 API
和 portal
的 return 值有些不匹配。
谢谢。
如果我没记错的话,它是每秒字节数。
这里我为 April 的问题添加了一个例子。
我通过 SoftLayer_Virtual_Guest:getBandwidthDataByDate 获得了数据。
getBandwidthDataByDate's output
显示'counter':646793.0,如果"unit"是每秒字节数,646793.0Bps*8/1024 != 16.62Kbps
您使用的方法将 return 一个 "average: bandwith usage, but the portal uses another method which returns a "sum" 值。因此这些值将不相同,但它们将接近。
另外需要指出的是API不是returnbytes/per秒,它是return一段时间内接口使用的字节数.我在你的 api 结果中看到的是那段时间是 5 分钟。
所以让我们用该信息转换数据:
5 分钟内 646793.0 字节
转换为每秒字节数(5 分钟 = 300 秒) 646793.0/300 = 2155.976 bytes/second
转换为位 2155.976 * 8 = 17247.808
转换为千位(注意我们没有使用 1024 ) 17247.808 / 1000 = 17.247 KB/s
正如我告诉您的那样,该值更接近,但由于所使用的方法不同,如果您正在寻找必须使用 getSummaryData 方法的确切值。这是 java
此致