...
|
...
|
@@ -132,7 +132,6 @@ public class MemcachedMonitorImpl { |
|
|
long oldSet = MemConstants.MEMCACHED_INFO_MAP.get(url).getOldSet();
|
|
|
info.setCmdSet((cmdSet - oldSet) / 120.0);
|
|
|
}
|
|
|
|
|
|
info.setCurConnections(Integer.parseInt(value.get("curr_connections")));
|
|
|
info.setCurItems(Integer.parseInt(value.get("curr_items")));
|
|
|
long get_hit = Long.parseLong(value.get("get_hits"));
|
...
|
...
|
@@ -140,7 +139,7 @@ public class MemcachedMonitorImpl { |
|
|
long limit_maxbytes = Long.parseLong(value.get("limit_maxbytes"));
|
|
|
long bytes = Long.parseLong(value.get("bytes"));
|
|
|
long uptime = Long.parseLong(value.get("uptime"));
|
|
|
LOGGER.debug(url + " monitor info: com_get is {},cmd_set is {},get_hit is {},get_misses is {},limit_maxbytes is {},bytes is {},uptime is {}", cmdGet, cmdSet, get_hit, get_misses, limit_maxbytes, bytes, uptime);
|
|
|
LOGGER.info(url + " monitor info: com_get is {},cmd_set is {},get_hit is {},get_misses is {},limit_maxbytes is {},bytes is {},uptime is {}", cmdGet, cmdSet, get_hit, get_misses, limit_maxbytes, bytes, uptime);
|
|
|
if ((get_hit + get_misses) == 0) {
|
|
|
info.setHitRate("100.0%");
|
|
|
} else {
|
...
|
...
|
@@ -150,6 +149,7 @@ public class MemcachedMonitorImpl { |
|
|
info.setUpTime(uptime / (60 * 60 * 24) + " Days");
|
|
|
info.setUseMemory(new DecimalFormat("0.00").format(bytes * 1.0 / 1024 / 1024 / 1024) + " G");
|
|
|
MemConstants.MEMCACHED_INFO_MAP.put(url, info);
|
|
|
LOGGER.info("MemConstants.MEMCACHED_INFO_MAP all key is {}",MemConstants.MEMCACHED_INFO_MAP.keySet());
|
|
|
}
|
|
|
}
|
|
|
}
|
...
|
...
|
|