jmx监控tomcat测试包

时间:2020-01-05 09:39:03
【文件属性】:

文件名称:jmx监控tomcat测试包

文件大小:28KB

文件格式:ZIP

更新时间:2020-01-05 09:39:03

jmxclient jmx-remote

catalina-jmx-remote.jar放到tomcat/lib目录下 如果是windows版本,编辑TOMCAT_HOME/bin/catalina.bat,在开头加入下面几行: set CATALINA_OPTS=%CATALINA_OPTS% -Djava.rmi.server.hostname=JMX_HOST set CATALINA_OPTS=%CATALINA_OPTS% -Djavax.management.builder.initial= set CATALINA_OPTS=%CATALINA_OPTS% -Dcom.sun.management.jmxremote=true set CATALINA_OPTS=%CATALINA_OPTS% -Dcom.sun.management.jmxremote.port=JMX_PORT set CATALINA_OPTS=%CATALINA_OPTS% -Dcom.sun.management.jmxremote.ssl=false set CATALINA_OPTS=%CATALINA_OPTS% -Dcom.sun.management.jmxremote.authenticate=false 如果是linux 如果是linux版本,编辑TOMCAT_HOME/bin/catalina.sh,在开头加入下面几行: CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=11111 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=192.168.7.150" 检测 java -jar cmdline-jmxclient-0.10.3.jar - 192.168.16.64:11111 java.lang:type=Memory NonHeapMemoryUsage 05/24/2014 15:42:02 +0800 org.archive.jmx.Client NonHeapMemoryUsage: committed: 47316992 init: 24313856 max: 136314880 used: 47012784 //运行时间 java -jar cmdline-jmxclient-0.10.3.jar - 192.168.16.64:11111 Catalina:type=Runtime Uptime //虚拟机 //进程 CPU 时间 java -jar cmdline-jmxclient-0.10.3.jar - 192.168.16.64:11111 java.lang:type=OperatingSystem ProcessCpuTime //进程 CPU 占用率 java -jar cmdline-jmxclient-0.10.3.jar - 192.168.16.64:11111 java.lang:type=OperatingSystem ProcessCpuLoad


【文件预览】:
catalina-jmx-remote.jar
cmdline-jmxclient-0.10.3.jar

网友评论