print disk byte metrics
This commit is contained in:
parent
a3dd84419b
commit
fe14eb78f0
|
@ -17,14 +17,15 @@ import net.hyperic.sigar.util.GetlineCompleter;
|
||||||
public class Iostat extends SigarCommandBase {
|
public class Iostat extends SigarCommandBase {
|
||||||
|
|
||||||
private static final String OUTPUT_FORMAT =
|
private static final String OUTPUT_FORMAT =
|
||||||
"%-15s %-15s %-10s %-10s";
|
"%-15s %-15s %-10s %-10s %-10s %-10s";
|
||||||
|
|
||||||
//like df -h -a
|
|
||||||
private static final String[] HEADER = new String[] {
|
private static final String[] HEADER = new String[] {
|
||||||
"Filesystem",
|
"Filesystem",
|
||||||
"Mounted on",
|
"Mounted on",
|
||||||
"Reads",
|
"Reads",
|
||||||
"Writes",
|
"Writes",
|
||||||
|
"Bytes Read",
|
||||||
|
"Bytes Written",
|
||||||
};
|
};
|
||||||
|
|
||||||
private GetlineCompleter completer;
|
private GetlineCompleter completer;
|
||||||
|
@ -96,6 +97,8 @@ public class Iostat extends SigarCommandBase {
|
||||||
items.add(fs.getDirName());
|
items.add(fs.getDirName());
|
||||||
items.add(String.valueOf(usage.getDiskReads()));
|
items.add(String.valueOf(usage.getDiskReads()));
|
||||||
items.add(String.valueOf(usage.getDiskWrites()));
|
items.add(String.valueOf(usage.getDiskWrites()));
|
||||||
|
items.add(Sigar.formatSize(usage.getDiskReadBytes()));
|
||||||
|
items.add(Sigar.formatSize(usage.getDiskWriteBytes()));
|
||||||
|
|
||||||
printf(items);
|
printf(items);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue