Forum Discussion
yuchunlei_10080
Nimbostratus
Dec 23, 2008CommonULong64.getLow() return negative ?
LBPool poolObj = new LBPool("user", "pwd", "10.31.100.4");
String[] names = poolObj.getList();
System.out.println(names.length);
for (int i = 0; i < names.length; i++) {
LocalLBPoolPoolStatistics stat = poolObj.getStatistics(names[ i ]);
LocalLBPoolPoolStatisticEntry[] ss = stat.getStatistics();
for (int j = 0; j < ss.length; j++) {
CommonStatistic[] cs = ss[j].getStatistics();
StringBuilder sb = new StringBuilder();
sb.append(padleft(ss[j].getPool_name()));
for (int n = 0; n < cs.length; n++) {
long lower=cs[n].getValue().getLow();
long v=(long)(cs[n].getValue().getHigh()<<32) + lower ;
sb.append(cs[n].getType().getValue)).append(v);
}
System.out.println(sb.toString());
}
}
- Don_MacVittie_1Historic F5 Accounttry changing your longs to unsigned long. The data fields are huge, and the sign bit is the high-end bit, so it is possible that you're overflowing the long and flipping the sign bit.
- yuchunlei_10080
Nimbostratus
thanks
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects