jvisualvm

使用JDK自带jvisualvm监控tomcat

蹲街弑〆低调 提交于 2019-12-01 06:28:14
jdk自带有个jvisualvm工具、该工具是用来监控java运行程序的cpu、内存、线程等的使用情况。并且使用图表的方式监控java程序、还具有远程监控能力。不失为一个用来监控tomcat的好工具。 在jdk目录下的bin目录中可以找到jvisualvm.exe文件、直接启动可以看到如下界面: 以上是已经连接远程的界面。直观的监控界面、更有助于我们分析tomcat的运行情况。 下面主要介绍下怎么样使用本地 jvisualvm监控远程tomcat。 tomcat自带的监控介绍可以参考: http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html 下面是我的配置方法: 在tomcat/bin目录下打开startup.sh或者startup.bat,在最后一行前面加上,也就是: exec "$PRGDIR"/"$EXECUTABLE" start "$@" 前面加上 export CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote -Djava.rmi.server.hostname=xxx.xxx.xxx.xxx -Dcom.sun.management.jmxremote.port=xxx -Dcom.sun.management.jmxremote.ssl

Can JVisualVM “Heap Dump” button release memory?

那年仲夏 提交于 2019-12-01 05:47:34
i have a very strange problem. I'm working on an OSGi application, based on Eclipse Equinox; it was developed using OSGi Log Service (Equinox implementation) and now I'm testing it with the Apache Felix OSGi Log Service implementation. At API/code side, all works fine: the OSGi log service is standard, so i can swap from Equinox to Felix without problem. However, I observed this strange behaviour: I started the application as console program, to see the log output on console, and i attached it the JVisualVM to analize the memory usage; the JVisualVM graph showed an used heap of 80 MBs. After

Can JVisualVM “Heap Dump” button release memory?

Deadly 提交于 2019-12-01 01:58:34
问题 i have a very strange problem. I'm working on an OSGi application, based on Eclipse Equinox; it was developed using OSGi Log Service (Equinox implementation) and now I'm testing it with the Apache Felix OSGi Log Service implementation. At API/code side, all works fine: the OSGi log service is standard, so i can swap from Equinox to Felix without problem. However, I observed this strange behaviour: I started the application as console program, to see the log output on console, and i attached

Why isn't VisualVM showing all the normal tabs?

廉价感情. 提交于 2019-11-30 10:52:38
Usually I see all these tabs in VisualVM for locally running Java programs: However, I have one local program which is currently only showing me Overview and Monitor (even though it usually shows all those shown above): Also interesting is that VisualVM itself doesn't present the Profile tab: All three of the programs shown are running with the same JVM with the same Java Home. What controls which tabs are shown for a particular program? How can I get them all back for my program showing just Overview and Monitor? I have Visual VM 1.3.5 (latest at this date) and JDK 1.7.0_17. I found that this

Java VisualVM Enable Heap Dump on OOME

限于喜欢 提交于 2019-11-30 05:34:33
According to documentation one could automatically take a heap dump when the application encounters an OutOfMemoryException. After OutOfMemoryException process just disappear from left menu. How does this feature works in VisualVM? Thanks. C:\work\temp>java -XX:HeapDumpPath=c:/work/temp/file.hprof -XX:+HeapDumpOnOutOfMemoryError -jar example.jar Eli Acherkan As far as I know, that option in JVisualVM is equivalent to specifying -XX:+HeapDumpOnOutOfMemoryError as a JVM parameter. This causes the JVM to create a heap dump file when it encounters an OutOfMemoryError. This file can be then loaded

CPU and profiling not supported for remote jvisualvm session

ε祈祈猫儿з 提交于 2019-11-30 05:04:25
When monitoring a remote app (using jstatd) I can neither profile nor monitor CPU consumption. Heap monitoring (provided I do not use G1) works. jvisualvm provides the message "Not supported for this JVM." in the CPU graph window. Is there anything missing in my setup? Google showed very few results. The local environment (Mac OS X 10.6): java version "1.6.0_15" Java(TM) SE Runtime Environment (build 1.6.0_15-b03-219) Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02-90, mixed mode) The remote environment (Linux version 2.6.16.27-0.9-smp (gcc version 4.1.0 (SUSE Linux))): java version "1.6.0

Java VisualVM does not show/list my tomcat java process

杀马特。学长 韩版系。学妹 提交于 2019-11-30 02:58:50
问题 I am using jdk64 and my java version is 1.6.0_24 . I am running both (Tomcat java process and VisualVM) processes as Administrator on Windows Server 2008. Tomcat is running with -Xmx7196m , where as jvisualvm is running with -Xms24m and -Xmx256m . Could this be the cause? 回答1: You need to add the JMX parameters to enable the JMX connection to your application, so add the following parameters: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management

How to find the default JMX port number?

白昼怎懂夜的黑 提交于 2019-11-29 19:25:50
I am running a Java application on Java 6 VM on a remote Windows XP, on which I can run jvisualvm.exe to connect to the running application automatically. Now I need to connect that application from my local computer, but I don't know the JMX port number of the remote computer. Where can I find it? Or, must I restart that application with some VM parameters to specify the port number? After reading the question How to find the JMX port in a server , I executed the command on the remote computer netstat -apn but got nothing. Now I need to connect that application from my local computer, but I

Why isn't VisualVM showing all the normal tabs?

老子叫甜甜 提交于 2019-11-29 11:18:57
问题 Usually I see all these tabs in VisualVM for locally running Java programs: However, I have one local program which is currently only showing me Overview and Monitor (even though it usually shows all those shown above): Also interesting is that VisualVM itself doesn't present the Profile tab: All three of the programs shown are running with the same JVM with the same Java Home. What controls which tabs are shown for a particular program? How can I get them all back for my program showing just

Java VisualVM Enable Heap Dump on OOME

巧了我就是萌 提交于 2019-11-29 03:25:54
问题 According to documentation one could automatically take a heap dump when the application encounters an OutOfMemoryException. After OutOfMemoryException process just disappear from left menu. How does this feature works in VisualVM? Thanks. C:\work\temp>java -XX:HeapDumpPath=c:/work/temp/file.hprof -XX:+HeapDumpOnOutOfMemoryError -jar example.jar 回答1: As far as I know, that option in JVisualVM is equivalent to specifying -XX:+HeapDumpOnOutOfMemoryError as a JVM parameter. This causes the JVM