In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Used to analyze jrockit virtual machine performance, can real-time monitor performance, analyze memory usage and so on, the current version has very detailed help, but also TMD Chinese, thanks to Oracle.
Server-side configuration is simple, that is, configure JMX
1. Prepare .access and .password files for access control
Mkdir-p / etc/jre_accesscp $JAVA_HOME/jre/lib/management/jmxremote.password.template / etc/jre_access/jmxremote.passwordcp $JAVA_HOME/jre/lib/management/jmxremote.access / etc/jre_access/jmxremote.accessvi / etc/jre_access/jmxremote.password#... # monitorRole QED# controlRole R&Dusername userpasswd vi / etc/jre_access/jmxremote.access##monitorRole readonly#controlRole readwrite\ # create javax.management.monitor.* Javax.management.timer.*\ # unregisterusername readwrite chmod 600 / etc/jre_access/jmxremote.passwordchmod 644 / etc/jre_access/jmxremote.access
two。 Add startup jmx class
# Monitoring port opened by jport= # IP$JAVA_HOME/bin/java-Dcom.sun.management.jmxremote.port=$jport-Dcom.sun.management.jmxremote.ssl=false-Dcom.sun.management.jmxremote.authenticate=true-Dcom.sun.management.jmxremote.access.file=/etc/jre_access/jmxremote.access-Dcom.sun.management.jmxremote.password.file=/etc/jre_access/jmxremote.password-Djava.rmi.server.hostname=$SERVERIP of the server where the SERVERIP= service resides. # connect the JAVA project parameters
3.tomcat add JMX Monitoring
Similar to the java project, it uses Tomcat/7.0.39 installed by yum
Directly posted to the JAVA_OPTS in tomcat7.conf can start, but can not be used to turn off egg pain. If you remove the parameter, you can turn it off.
Have no choice but to change the tomcat7.conf into two copies of tomcat7_start.conf,tomcat7_stop.conf and modify / etc/init.d/tomcat7
#-# add code #-cp / etc/tomcat7/tomcat7.conf / etc/tomcat7/tomcat7_start.confcp / etc/tomcat7/tomcat7.conf / etc/tomcat7/tomcat7_stop.conf vi / etc/tomcat7/tomcat7_start.conf#. JAVA_OPTS= "$JAVA_OPTS-verbosegc-Dcom.sun.management.jmxremote.port=7091-Dcom.sun.management.jmxremote.ssl=false-Dcom.sun.management.jmxremote. Authenticate=true-Dcom.sun.management.jmxremote.access.file=/etc/jre_access/jmxremote.access-Dcom.sun.management.jmxremote.password.file=/etc/jre_access/jmxremote.password-Djava.rmi.server.hostname=218.58.x.x "vi / etc/init.d/tomcat7# modify TOMCAT_CFG part # Get the tomcat config (use this for environment specific settings) TOMCAT_CFG_start=" / etc/tomcat7/tomcat7_start.conf "if [- r" $TOMCAT_CFG_start "] Then. $TOMCAT_CFG_startfi TOMCAT_CFG_stop= "/ etc/tomcat7/tomcat7_stop.conf" if [- r "$TOMCAT_CFG_stop"]; then. $TOMCAT_CFG_stopfi # modify function parseOptions () function parseOptions_start () {options= "" options= "$options $(awk'! / ^ # / & &! / ^ $/ {ORS="; print "export", $0, ";"}'\ $TOMCAT_CFG_start) "if [- r" / etc/sysconfig/$ {NAME} "] Then options= "$options $(awk'! / ^ # / & &! / ^ $/ {ORS="; print "export", $0, " "}'/ etc/sysconfig/$ {NAME})" fi TOMCAT_SCRIPT= "$options ${TOMCAT_SCRIPT}"} function parseOptions_stop () {options= "" options= "$options $(awk'! / ^ # / & &! / ^ $/ {ORS="; print "export", $0, " "}'\ $TOMCAT_CFG_stop)" if [- r "/ etc/sysconfig/$ {NAME}"]; then options= "$options $(awk'! / ^ # / &! / ^ $/ {ORS="; print "export", $0, " "}'\ / etc/sysconfig/$ {NAME})" fi TOMCAT_SCRIPT= "$options ${TOMCAT_SCRIPT}"} # modify parseOptionsfunction start () {... ParseOptions_start...} function stop () {... ParseOptions_stop...} # modify the stop parameter and execute stop twice) stop > > / dev/null 2 > & 1 stop
This allows the client to monitor the JVM project over an Oracle JRockit Mission Control connection
The end of this reply
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.