I would like to monitor the java application on our production machine. I don't want to restart the process (to start it with a port number). Is there a way that I can attach jconsole to a already running process remotely? Security is not a problem since we are behind a firewall, so I can set password authentication and SSL to false.
Also another problem with remote monitoring is that I need to assign a different port number to each VM (we have quite a few of them running on the same machine) and then remember the port number of each. Is there a way that I can have one port number for a machine, and JConsole shows a list of all VMs running on that port.
I just posted a blog entry http://weblogs.java.net/blog/emcmanus/archive/2007/08/combining_casca.html which addresses your second question. The answer to the first question is that you need to have something running on the same machine as the application that will make the application monitorable. This something could be the Master Agent I describe in my blog.
Regards,
?amonn McManus -- JMX Spec Lead -- http://weblogs.java.net/blog/emcmanus