deprecating ProcMem.getVsize, ProcMem.getSize will be the same on all.
deprecating ProcMem.getRss, ProcMem.getResident will be the same on all.
This commit is contained in:
parent
d69dc1c8c9
commit
5e2271ca59
|
@ -237,17 +237,12 @@ my %classes = (
|
|||
ProcMem => [
|
||||
{
|
||||
name => 'size', type => 'Long',
|
||||
desc => 'Total process memory',
|
||||
plat => 'AFHLSW'
|
||||
},
|
||||
{
|
||||
name => 'vsize', type => 'Long',
|
||||
desc => 'Total process virtual memory',
|
||||
plat => 'AFHLSW'
|
||||
plat => '*'
|
||||
},
|
||||
{
|
||||
name => 'resident', type => 'Long',
|
||||
desc => 'Total process non-swapped memory',
|
||||
desc => 'Total process resident memory',
|
||||
plat => '*'
|
||||
},
|
||||
{
|
||||
|
@ -255,11 +250,6 @@ my %classes = (
|
|||
desc => 'Total process shared memory',
|
||||
plat => 'AHLS'
|
||||
},
|
||||
{
|
||||
name => 'rss', type => 'Long',
|
||||
desc => 'Process resident set size',
|
||||
plat => '*'
|
||||
},
|
||||
{
|
||||
name => 'minor_faults', type => 'Long',
|
||||
desc => 'non i/o page faults',
|
||||
|
@ -1202,6 +1192,18 @@ EOF
|
|||
public static final char STOP = 'T';
|
||||
public static final char ZOMBIE = 'Z';
|
||||
public static final char IDLE = 'D';
|
||||
EOF
|
||||
ProcMem => <<'EOF',
|
||||
/**
|
||||
* @deprecated
|
||||
* @see getResident
|
||||
*/
|
||||
public long getRss() { return getResident(); }
|
||||
/**
|
||||
* @deprecated
|
||||
* @see getSize
|
||||
*/
|
||||
public long getVsize() { return getSize(); }
|
||||
EOF
|
||||
);
|
||||
|
||||
|
|
|
@ -57,16 +57,6 @@ public class MemWatch {
|
|||
buf.append("size=" + diff);
|
||||
}
|
||||
|
||||
diff = cur.getVsize() - last.getVsize();
|
||||
if (diff != 0) {
|
||||
buf.append(", vsize=" + diff);
|
||||
}
|
||||
|
||||
diff = cur.getRss() - last.getRss();
|
||||
if (diff != 0) {
|
||||
buf.append(", rss=" + diff);
|
||||
}
|
||||
|
||||
diff = cur.getResident() - last.getResident();
|
||||
if (diff != 0) {
|
||||
buf.append(", resident=" + diff);
|
||||
|
|
|
@ -44,8 +44,7 @@ public class MultiPs extends SigarCommandBase {
|
|||
|
||||
ProcMem mem = this.proxy.getMultiProcMem(query);
|
||||
println("Size: " + Sigar.formatSize(mem.getSize()));
|
||||
println("Vsize: " + Sigar.formatSize(mem.getVsize()));
|
||||
println("Rss: " + Sigar.formatSize(mem.getRss()));
|
||||
println("Resident: " + Sigar.formatSize(mem.getResident()));
|
||||
println("Share: " + Sigar.formatSize(mem.getShare()));
|
||||
}
|
||||
|
||||
|
|
|
@ -53,8 +53,12 @@ public class SigarProcess implements SigarProcessMBean {
|
|||
return getLongValue(procMem, "Size");
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see getMemSize
|
||||
*/
|
||||
public Long getMemVsize() {
|
||||
return getLongValue(procMem, "Vsize");
|
||||
return getMemSize();
|
||||
}
|
||||
|
||||
public Long getMemShare() {
|
||||
|
|
|
@ -9,6 +9,10 @@ public interface SigarProcessMBean {
|
|||
|
||||
public Long getMemSize();
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see getMemSize
|
||||
*/
|
||||
public Long getMemVsize();
|
||||
|
||||
public Long getMemShare();
|
||||
|
|
|
@ -68,7 +68,7 @@ public class Proxy {
|
|||
}
|
||||
|
||||
private long getSize() throws SigarException {
|
||||
return sigar.getProcMem(ourPid).getVsize();
|
||||
return sigar.getProcMem(ourPid).getResident();
|
||||
}
|
||||
|
||||
private boolean memstat(long i) throws SigarException {
|
||||
|
|
|
@ -23,7 +23,7 @@ public class TestInvoker extends SigarTestCase {
|
|||
{ "sigar:Type=LoadAverage", "1" },
|
||||
{ "sigar:Type=LoadAverage", "2" },
|
||||
{ "sigar:Type=ProcMem,Arg=$$", "Size" },
|
||||
{ "sigar:Type=ProcMem,Arg=$$", "Vsize" },
|
||||
{ "sigar:Type=ProcMem,Arg=$$", "Resident" },
|
||||
{ "sigar:Type=ProcTime,Arg=$$", "Sys" },
|
||||
{ "sigar:Type=ProcTime,Arg=$$", "User" },
|
||||
{ "sigar:Type=ProcTime,Arg=$$", "Total" },
|
||||
|
|
|
@ -22,10 +22,8 @@ public class TestProcMem extends SigarTestCase {
|
|||
|
||||
traceln("Pid=" + pid);
|
||||
traceln("Size=" + Sigar.formatSize(procMem.getSize()));
|
||||
traceln("Vsize=" + Sigar.formatSize(procMem.getVsize()));
|
||||
traceln("Resident=" + Sigar.formatSize(procMem.getResident()));
|
||||
traceln("Share=" + Sigar.formatSize(procMem.getShare()));
|
||||
traceln("Rss=" + Sigar.formatSize(procMem.getRss()));
|
||||
traceln("MinorFaults=" + procMem.getMinorFaults());
|
||||
traceln("MajorFaults=" + procMem.getMajorFaults());
|
||||
traceln("PageFaults=" + procMem.getPageFaults());
|
||||
|
|
Loading…
Reference in New Issue