SixFive...

Monitor ColdFusion Instances with Jvmstat from Sun

When ColdFusion MX 7 came along the old ways of performance logging went out the window somewhat. cfstat got lost because it cant cope with multiple jrun instances and for some reason Jrun metrics doesn’t want to work either (at least I couldn’t get it to work). At MXDU I saw Kai Koenig talk about […]
June 18, 2005 6:37 pm

Monitor ColdFusion Instances with Jvmstat from Sun

When ColdFusion MX 7 came along the old ways of performance logging went out the window somewhat. cfstat got lost because it cant cope with multiple jrun instances and for some reason Jrun metrics doesn’t want to work either (at least I couldn’t get it to work).

At MXDU I saw Kai Koenig talk about balancing and tuning CFMX 7 servers. He recommended Jvmstat and visualgc. These are both tools provided free by Sun for monitoring Java Virtual Machines (servers wot process Java programs).

So I set about trying to get this stuff working on our Windows 2003 server. Here are the steps I took, and hopefully it might help you out.

You will notice that from the jvmstat page there is a link for installation of the tools, its useful to follow, but a painful process. To make things simpler I created a bat file as follows:

This goes through the process of updating the windows path variable so we have everything we need to get at. Then it runs jps to list all the processes available to the current user.

You will need to get the JRun service (CF instance) running under the local user, this means opening another command prompt and using the following to stop the service and start it up again.

Going back to the first window, use jps again to list the process id’s. Conveniently the CF instance you just restarted will now appear, but have no description. Thats the processid you want.

Now you can use visualgc to look at whats going on, 2397 is an example processid, use the one listed in your jps:

Java will start up visual gc and you will have a working visual model of your Jrun server in action. Did I mention its all free?

Leave a Comment