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:
cd \
SET PATH=
c:\jvmstat\bat;
C:\Program Files\Java\jdk1.5.0_03\bin;%PATH%;
SET PATH=
c:\JRun4\bin;%PATH%;
PATH
echo
"you should probably stop the server you want to monitor is services"
echo
"then use jrun -start to crank it up"
echo
"Do this in a new window though"
jps
echo
"now use jstat -gcutil processid 1000 10"
echo
"or visualgc processid"
C:\jvmstat\bin
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.
jrun -stop
jrun -start
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:
visualgc 2397
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?
There are no comments for this entry.
[Add Comment]