On Dec 5, 2007, at 4:29 AM, Vamsavardhana Reddy wrote:
On Dec 4, 2007 11:23 PM, Anita Kulshreshtha [EMAIL PROTECTED]
wrote:
It is not clear to me if this is part of the earlier code or a
separate program. If it is part of the JMX code, then Runtime is from
the local jvm not remote. The
On Dec 7, 2007 9:38 PM, Matt Hogstrom [EMAIL PROTECTED] wrote:
On Dec 5, 2007, at 4:29 AM, Vamsavardhana Reddy wrote:
On Dec 4, 2007 11:23 PM, Anita Kulshreshtha [EMAIL PROTECTED]
wrote:
It is not clear to me if this is part of the earlier code or a
separate program. If it is
On Dec 4, 2007 11:23 PM, Anita Kulshreshtha [EMAIL PROTECTED] wrote:
It is not clear to me if this is part of the earlier code or a
separate program. If it is part of the JMX code, then Runtime is from
the local jvm not remote. The non heap Memory for this program in
either case is
If you are interested in usedMemory and maxMemory as given by
Runtime, we could add that again. The JVM Stats give a rough estimate
of heap memory only.
Thanks
Anita
--- Vamsavardhana Reddy [EMAIL PROTECTED] wrote:
I am wondering if the following (which works) is the correct way to
get
I don't know if it is necessary to add the statistics from Runtime. Here is
the relationship I see between the stats from Runtime and those got from
MemoryMXBean.getHeapMemoryUsage()
Runtime.totalMemory() == MemoryUsage.getCommitted()
Runtime.maxMemory() == MemoryUsage.getMax()
IIUC,
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/management/MemoryMXBean.html
runtime values are sum of values from Heap and non heap memory. In
other words you need to add contribution from non heap Memory to all 4
equations.
Thanks
Anita
--- Vamsavardhana Reddy [EMAIL PROTECTED]
I don't know why the non heap memory is missing in the equations. The
equations I gave are based what I observed by running the following code.
MemoryMXBean memmxbean = ManagementFactory.getMemoryMXBean();
Runtime rt = Runtime.getRuntime();
MemoryUsage
It is not clear to me if this is part of the earlier code or a
separate program. If it is part of the JMX code, then Runtime is from
the local jvm not remote. The non heap Memory for this program in
either case is negligible.
You could start G with -Dcom.sun.management.jmxremote. Start
On Dec 4, 2007 11:23 PM, Anita Kulshreshtha [EMAIL PROTECTED] wrote:
It is not clear to me if this is part of the earlier code or a
separate program. If it is part of the JMX code, then Runtime is from
the local jvm not remote. The non heap Memory for this program in
either case is
I am wondering if the following (which works) is the correct way to get
maxHeapSize and usedMemory from a remote Geronimo server.
import org.apache.geronimo.management.stats.BoundedRangeStatisticImpl;
Map map = new HashMap();
map.put(jmx.remote.credentials, new String[] {user,
You can do it that way or do it the JSR-77 way.
Properties props = new Properties();
props.setProperty(Context.INITIAL_CONTEXT_FACTORY,
org.apache.openejb.client.RemoteInitialContextFactory);
props.setProperty(Context.PROVIDER_URL, ejbd://localhost:4201);
That worked too. Thanks.
++Vamsi
On Dec 4, 2007 12:29 AM, Viet Nguyen [EMAIL PROTECTED] wrote:
You can do it that way or do it the JSR-77 way.
Properties props = new Properties();
props.setProperty(Context.INITIAL_CONTEXT_FACTORY,
12 matches
Mail list logo