private void dump(RrdDb rrd) throws IOException {
StringBuffer line = new StringBuffer();
int n = rrd.getDsCount();
for (int i = 0; i < n; i++) {
Datasource ds = rrd.getDatasource(i);
line.append("DS[");
line.append(ds.getDsName());
line.append("] typ: ");
line.append(ds.getDsType());
while (line.length() < 24) {
line.append(' ');
}
line.append("hbt: ");
line.append(ds.getHeartbeat());
while (line.length() < 40) {
line.append(' ');
}
line.append("min: ");
line.append(String.format("%-11f", ds.getMinValue()));
line.append("max: ");
line.append(String.format("%-11f", ds.getMaxValue()));
println(line.toString());
line.setLength(0);
}
}