run GC remote

can i run GC from my jconsole when i connect to it an remote?
[68 byte] By [chnada] at [2007-11-27 7:02:43]
# 1
Go to the memory tab and click on the Perform GC button.
lmalventa at 2007-7-12 18:53:48 > top of Java-index,Core,Monitoring & Management...
# 2
sorry, but i have only the mbean tab how appears, i have the MBean that i have create and tomcat mbean.
chnada at 2007-7-12 18:53:48 > top of Java-index,Core,Monitoring & Management...
# 3

I'm afraid you're running Tomcat on JDK 1.4.x. This means you don't have the platform MBeans that allow you to access the VM instrumentation as they didn't exist at that time. These platform MBeans were introduced in JDK 5.0.

It could be also that you are running Tomcat on JDK 5.0 or later but your JMX connector server is not using the platform MBean server.

If you're running on JDK 1.4.x and cannot migrate to JDK 5.0 then you could still supply the "PerformGC" operation as long as you implement it in your MBean.

For more detailed info on the M&M capabilities of the Java Platform have a look at:

http://java.sun.com/javase/6/docs/technotes/guides/management/index.html

lmalventa at 2007-7-12 18:53:48 > top of Java-index,Core,Monitoring & Management...
# 4
hi,my tomcat run on jdk 1.5. i havn't understand, what you want to say by "JMX connector server is not using the platform MBean server." ?how should i do to expose memory tab in my jconsole ?thanks
chnada at 2007-7-12 18:53:48 > top of Java-index,Core,Monitoring & Management...
# 5

Please let me know how do you connect JConsole to the JMX agent started by your Tomcat

server.

Do you select the java process from the Local Process table in the Connection Dialog or you

enter a <hostname>:<port> (or a JMXServiceURL)?

If Tomcat uses the out-of-the-box management agent then you should see the VM MBeans

and thus all the tabs in JConsole. If Tomcat starts its own JMX connector server with its own

MBeanServer (different from the platform MBeanServer) then you will only see the MBeans

tab with your custom MBeans.

Regards,

Luis

lmalventa at 2007-7-12 18:53:48 > top of Java-index,Core,Monitoring & Management...
# 6
i use 'advanced' (JMXServiceURL) for connecting to jconsolewhen i connect an local i see VM MBeans but my problem is that i want to see it in advanced connection.do you have solution ?thanks lot for your help. and sorry for my bad english.
chnada at 2007-7-12 18:53:48 > top of Java-index,Core,Monitoring & Management...
# 7

Add your MBeans to the platform MBeanServer by using:

MBeansServer mbs = java.lang.management.ManagementFactory.getPlatformMBeanServer();

or have a look at the Tomcat administration guide to see how to make

Tomcat use the platform MBeanServer instead of using a proprietary one.

Regards,

Luis

lmalventa at 2007-7-12 18:53:48 > top of Java-index,Core,Monitoring & Management...