From 54dbe31c629013a75b7708da8395a2e3f1410716 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Wed, 10 Nov 2004 23:37:57 +0000 Subject: [PATCH] ProcMem for multiple processes --- .../src/net/hyperic/sigar/MultiProcMem.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 bindings/java/src/net/hyperic/sigar/MultiProcMem.java diff --git a/bindings/java/src/net/hyperic/sigar/MultiProcMem.java b/bindings/java/src/net/hyperic/sigar/MultiProcMem.java new file mode 100644 index 00000000..1ff8c69f --- /dev/null +++ b/bindings/java/src/net/hyperic/sigar/MultiProcMem.java @@ -0,0 +1,25 @@ +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