diff --git a/bindings/java/src/net/hyperic/sigar/jmx/SigarProcess.java b/bindings/java/src/net/hyperic/sigar/jmx/SigarProcess.java index a7809a0b..b6b796cd 100644 --- a/bindings/java/src/net/hyperic/sigar/jmx/SigarProcess.java +++ b/bindings/java/src/net/hyperic/sigar/jmx/SigarProcess.java @@ -61,10 +61,18 @@ public class SigarProcess implements SigarProcessMBean { return getMemSize(); } + public Long getMemResident() { + return getLongValue(procMem, "Resident"); + } + public Long getMemShare() { return getLongValue(procMem, "Share"); } + public Long getMemPageFaults() { + return getLongValue(procMem, "PageFaults"); + } + public Long getTimeUser() { return getLongValue(procTime, "User"); } @@ -72,4 +80,14 @@ public class SigarProcess implements SigarProcessMBean { public Long getTimeSys() { return getLongValue(procTime, "Sys"); } + + public static void main(String args[]) { + SigarProcessMBean proc = new SigarProcess(); + System.out.println("MemSize=" + proc.getMemSize()); + System.out.println("MemResident=" + proc.getMemResident()); + System.out.println("MemShared=" + proc.getMemShare()); + System.out.println("MemPageFaults=" + proc.getMemPageFaults()); + System.out.println("TimeUser=" + proc.getTimeUser()); + System.out.println("TimeSys=" + proc.getTimeSys()); + } } diff --git a/bindings/java/src/net/hyperic/sigar/jmx/SigarProcessMBean.java b/bindings/java/src/net/hyperic/sigar/jmx/SigarProcessMBean.java index cfe8b86e..8ea1c6ad 100644 --- a/bindings/java/src/net/hyperic/sigar/jmx/SigarProcessMBean.java +++ b/bindings/java/src/net/hyperic/sigar/jmx/SigarProcessMBean.java @@ -15,8 +15,12 @@ public interface SigarProcessMBean { */ public Long getMemVsize(); + public Long getMemResident(); + public Long getMemShare(); + public Long getMemPageFaults(); + public Long getTimeUser(); public Long getTimeSys();