package net.hyperic.sigar;

import net.hyperic.sigar.ptql.ProcessFinder;

public class MultiProcMem extends ProcMem {

    static ProcMem get(Sigar sigar, String query)
        throws SigarException {

        ProcMem mem = new ProcMem();

        long[] pids = ProcessFinder.find(sigar, query);

        for (int i=0; i<pids.length; i++) {
            ProcMem pmem = sigar.getProcMem(pids[i]);
            mem.size     += pmem.size;
            mem.vsize    += pmem.vsize;
            mem.resident += pmem.resident;
            mem.share    += pmem.share;
            mem.rss      += pmem.rss;
        }
        
        return mem;
    }
}

@@ -431,48 +431,8 @@
 ze;%0A
-            mem.vsize    += pmem.vsize;%0A
     
@@ -514,46 +514,8 @@
 re;%0A
-            mem.rss      += pmem.rss;%0A
     

remove vsize and rss