-
Notifications
You must be signed in to change notification settings - Fork 323
Ady Liu edited this page May 11, 2012
·
3 revisions
#JMX Document>>JMX
##Configuration
Two conditions for jmx:
- $JAFKA_HOME/lib/optional/mx4j-tools-3.0.1.jar in the classpath
- Java command line has '-Djafka_mx4jenable=true'
If jafka run as wrapper([install(install)]), you should change two places in file $JAFKA_HOME/bin/jafka.conf:
wrapper.java.classpath.4=%JAFKA_HOME%/lib/optional/*.jar
wrapper.java.additional.3=-Djafka_mx4jenable=true
Becareful the index of classpath and additional.
After doing this, the default wrapper running configuration likes this:
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
wrapper.java.classpath.1=%JAFKA_HOME%/lib/*.jar
wrapper.java.classpath.2=%JAFKA_HOME%/bin/optional/*.jar
wrapper.java.classpath.3=%JAFKA_HOME%/bin
wrapper.java.classpath.4=%JAFKA_HOME%/lib/optional/*.jar
wrapper.java.library.path.1=%JAFKA_HOME%/bin/optional
wrapper.java.additional.auto_bits=TRUE
wrapper.java.additional.1=-Xloggc:%JAFKA_HOME%/logs/gc.log
wrapper.java.additional.2=-server
wrapper.java.additional.3=-Djafka_mx4jenable=true
wrapper.java.initmemory=128
wrapper.java.maxmemory=1024
wrapper.app.parameter.1=com.sohu.jafka.Jafka
wrapper.app.parameter.2=%JAFKA_HOME%/conf/server.properties
Now start the server using:
./run.sh start
Restart the server if you have started over:
./run.sh restart
Access the web page by:
http://localhost:8082
mx4j allows to setting the bind address and port:
wrapper.java.additional.4=-Dmx4jaddress=127.0.0.1
wrapper.java.additional.5=-Dmx4jport=80
Language: English | Simple Chinese