jvisualvm

How to check heap usage of a running JVM from the command line?

那年仲夏 提交于 2019-11-27 09:50:33
问题 Can I check heap usage of a running JVM from the commandline, I mean the actual usage rather than the max amount allocated with Xmx. I need it to be commandline because I don't have access to a windowing environment, and I want script based on the value , the application is running in Jetty Application server 回答1: You can use jstat, like : jstat -gc pid Full docs here : http://docs.oracle.com/javase/7/docs/technotes/tools/share/jstat.html 回答2: For Java 8 you can use the following command line

Get heap dump from a remote application in Java using JVisualVM

不羁的心 提交于 2019-11-27 05:30:38
问题 I run JVisualVM (Windows XP, Sun Java 1.6.0.13, 32 bit client VM) to monitor a distant application (Linux, Sun Java 1.6.0.07, 64 bit server VM). Before starting the actual remote application, I launch on the remote machine jstatd using an all access policy: grant codebase "file:${java.home}/../lib/tools.jar" { permission java.security.AllPermission; }; Then I start the actual app using the command line java -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl

Does Java 6 open a default port for JMX remote connections?

五迷三道 提交于 2019-11-26 23:53:20
问题 My specific question has to do with JMX as used in JDK 1.6: if I am running a Java process using JRE 1.6 with com.sun.management.jmxremote in the command line, does Java pick a default port for remote JMX connections? Backstory: I am currently trying to develop a procedure to give to a customer that will enable them to connect to one of our processes via JMX from a remote machine. The goal is to facillitate their remote debugging of a situation occurring on a real-time display console.

Why a sawtooth shaped graph?

半世苍凉 提交于 2019-11-26 20:37:17
问题 When I run the below mentioned code using NetBeans, the allocated heap size graph resembles a sawtooth shape. I am attaching the screen capture from JVisualVM which shows the heap allocation graph in with a sawtooth shape. The program is a simple infinite loop printing "Hello, World!" into the console. public class HelloWorld { public static void main(String a[]){ while(true) { System.out.println("Hello, World!"); } } } Can anyone explain the reason behind the shape of the graph of used heap?