Running jconsole against your axiom build.
The start script for the nei axiom instance was modified to run the following:
$JAVACMD -Djava.rmi.server.hostname=nei.siteworx.com -Dcom.sun.management.jmxremote.port=8089 \ -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false \ -Dfile.encoding=$ENCODING -Dorg.apache.lucene.FSDirectory.class=$FSDIRECTORY $JAVA_OPTIONS \ -jar "$INSTALL_DIR/launcher.jar" $SWITCHES & echo $! > /var/run/axiom/axiom_`hostname`.pid
Notice the property flags dealing with rmi and jmxremote. We have turned off authentication to get this working but we should figure out how to run it with the proper security in place. This runs the rmi server on port 8089 and waits for a client to connect and collect data. You should be able to see it by running netstat -a. Note that if the build isn’t on your internal network, your network administrator will also need to open 8089 as well as the port range 40000-50000 to outside traffic for this to work properly.
Also, the echo…pid line at the end is for capturing the process id on solaris it can be monitored with tools like hyperic. You need to remove this for Windows.
On your local machine in your java jdk/bin folder should be the jconsole.exe program. You run that on the command line as stated before.
jconsole -J-Djava.rmi.server.hostname=nei.siteworx.com
If you want logging you can drop the attached file into the bin folder and add the following:
jconsole -J-Djava.rmi.server.hostname=nei.siteworx.com -J-Djava.util.logging.config.file=logging.properties
If you are running a local axiom instance you can use the local process option when connection and just pass it localhost.
sample logging.properties
// logging.properties file to activate JMX traces. // Use this file on the java command line: // java -Djava.util.logging.conig.file=<logging.properties> // handlers= java.util.logging.ConsoleHandler.level=INFO java.util.logging.FileHandler.pattern = %h/java%u.log java.util.logging.FileHandler.limit = 50000 java.util.logging.FileHandler.count = 1 java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter java.util.logging.ConsoleHandler.level = FINEST java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter // Use FINER or FINEST for javax.management.remote.level - FINEST is // very verbose... // javax.management.level=FINEST javax.management.remote.level=FINEST
