add MemResident and MemPageFaults
This commit is contained in:
parent
9a7d971c3b
commit
296af07277
@ -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());
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user