【发布时间】:2016-03-14 22:38:25
【问题描述】:
我正在使用 SL java 客户端在详细设备中开发资源图,例如带宽、使用情况、内存和 cpu。从 api 检索到的数据与控制门户上的图形不同。
这些数据来自 control.softlayer.com 上的图表
Date CPU Value
2016-03-03T10:00:00-06:00 0.67
2016-03-03T10:30:00-06:00 0.86
2016-03-03T11:00:00-06:00 0.84
2016-03-03T11:30:00-06:00 1
2016-03-03T12:00:00-06:00 0.82
这些是来自 SL API 的数据。 getCount() 是 CPU 值。 getType() : cpu0
getCounter() : 0.26266666666667
getDateTime() : 03 03 2016 10:00:00-0600
dt.hashCode() : 1396398841
****************************************
getType() : cpu0
getCounter() : 0.42433333333333
getDateTime() : 03 03 2016 10:30:00-0600
dt.hashCode() : 1574026271
****************************************
getType() : cpu0
getCounter() : 0.591
getDateTime() : 03 03 2016 11:00:00-0600
dt.hashCode() : 1955972951
****************************************
getType() : cpu0
getCounter() : 0.57966666666667
getDateTime() : 03 03 2016 11:30:00-0600
dt.hashCode() : 357719181
****************************************
getType() : cpu0
getCounter() : 0.55033333333333
getDateTime() : 03 03 2016 12:00:00-0600
dt.hashCode() : 1379547114
****************************************
我使用这个 api 来获取 CPU 数据。 List dataList = Guest.service(client, deviceID).getCpuMetricDataByDate(startDate, endDate, null);
内存数据 API List dataList = Guest.service(client, deviceID).getMemoryMetricDataByDate(startDate, endDate);
带宽数据 API 列表 dataList = Guest.service(client, deviceID).getBandwidthDataByDate(startDate, endDate, "public");
这些数据也与图表上的数据不匹配。 请给我你的 cmets 我如何获得精确的数据。
谢谢
【问题讨论】: