VM vm = VM.getByUuid(conn, vmUUID);
VmStatsEntry stats = vmResponseMap.get(vmUUID);
double diskReadKBs = 0;
double diskWriteKBs = 0;
for (VBD vbd : vm.getVBDs(conn)) {
VBDMetrics vbdmetrics = vbd.getMetrics(conn);
if (!isRefNull(vbdmetrics)) {
try {
diskReadKBs += vbdmetrics.getIoReadKbs(conn);
diskWriteKBs += vbdmetrics.getIoWriteKbs(conn);
} catch (Types.HandleInvalid e) {
s_logger.debug("vbdmetrics doesn't exist ");
}
}
}