add MemResident and MemPageFaults

This commit is contained in:
Doug MacEachern 2006-03-04 03:29:21 +00:00
parent 9a7d971c3b
commit 296af07277
2 changed files with 22 additions and 0 deletions

View File

@ -61,10 +61,18 @@ public class SigarProcess implements SigarProcessMBean {
return getMemSize(); return getMemSize();
} }
public Long getMemResident() {
return getLongValue(procMem, "Resident");
}
public Long getMemShare() { public Long getMemShare() {
return getLongValue(procMem, "Share"); return getLongValue(procMem, "Share");
} }
public Long getMemPageFaults() {
return getLongValue(procMem, "PageFaults");
}
public Long getTimeUser() { public Long getTimeUser() {
return getLongValue(procTime, "User"); return getLongValue(procTime, "User");
} }
@ -72,4 +80,14 @@ public class SigarProcess implements SigarProcessMBean {
public Long getTimeSys() { public Long getTimeSys() {
return getLongValue(procTime, "Sys"); 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());
}
} }

View File

@ -15,8 +15,12 @@ public interface SigarProcessMBean {
*/ */
public Long getMemVsize(); public Long getMemVsize();
public Long getMemResident();
public Long getMemShare(); public Long getMemShare();
public Long getMemPageFaults();
public Long getTimeUser(); public Long getTimeUser();
public Long getTimeSys(); public Long getTimeSys();