public void terminate() {
/* implemented for interface compliance */
}
private DiskSpaceUtilization getDiskSpaceUtilizationUsingSigar() {
DiskSpaceUtilization dsu;
try {
/*
FileSystemUsage fUse = sigar.getFileSystemUsage(File.separator);
double available = fUse.getFree()*1024;
double used = fUse.getUsed()*1024;
double total = fUse.getTotal()*1024;
*/
double available = sigar.getFileSystemFree(fileSystem)*1024;
double used = sigar.getFileSystemUsed(fileSystem)*1024;
double total = sigar.getFileSystemTotal(fileSystem)*1024;
dsu = new DiskSpaceUtilization(id,
used,
available,
total,
sigar.getFileSystemUsedPercent(fileSystem),
tVals);
} catch (Exception e) {
logger.warn("SIGAR exception getting FileSystemUsage", e);
dsu = new DiskSpaceUtilization(id, -1, tVals);
}
return dsu;
}