diff --git a/bindings/java/src/net/hyperic/sigar/cmd/Free.java b/bindings/java/src/net/hyperic/sigar/cmd/Free.java index 4ceee238..a633b7b3 100644 --- a/bindings/java/src/net/hyperic/sigar/cmd/Free.java +++ b/bindings/java/src/net/hyperic/sigar/cmd/Free.java @@ -37,6 +37,11 @@ public class Free extends SigarCommandBase { format(mem.getFree()) }; + Object[] actualRow = new Object[] { + format(mem.getActualUsed()), + format(mem.getActualFree()) + }; + Object[] swapRow = new Object[] { format(swap.getTotal()), format(swap.getUsed()), @@ -47,6 +52,13 @@ public class Free extends SigarCommandBase { printf("Mem: %10ld %10ld %10ld", memRow); + //e.g. linux + if ((mem.getUsed() != mem.getActualUsed()) || + (mem.getFree() != mem.getActualFree())) + { + printf("-/+ buffers/cache: " + "%10ld %10d", actualRow); + } + printf("Swap: %10ld %10ld %10ld", swapRow); printf("RAM: %10ls", new Object[] { mem.getRam() + "MB" });