Jvm performance monitoring and common tools, common tools for jvm monitoring
Common JDK command line tools
Jps: jps [options] [hostid].-q only displays the jvmid,-m parameter pas
Chapter 8 JVM performance monitoring and troubleshooting tools (2), jvm troubleshooting
Note: This blog is mainly recorded in "deep understanding of Java Virtual Machine (version 2)"
Note: For details about JVM performance monitoring
Oom?Java.lang.OutOfMemoryError:java head space heap memory overflowJava.lang.OutOfMemoryError:Permgen Space Java Eternal Overflow, that is, methods to overflow, generally because of the emergence of a large number of classes and JSPs, or the use of Cglib reflection mechanism,This can be resolved by changing the size of the method area and modifying it in the form of a similar-xx:permsize=64m-xx:maxpermsize=256m. In addition, too many constants, especially strings, can cause the method area to ov
1, Jdb (the Java debuger)JDB is used to debug core files and running Java processes in real-time, with rich commands to help you debug, and its functionality is very similar to the DBX in Sun Studio, but JDB is specifically designed for Java applications.Now it should be said that the daily development of the jdb is seldom used, because now the IDE has been packaged for us, such as the use of Eclipse Invoke program is very convenient, as long as in very specific circumstances may use this comman
The JDK itself provides many convenient JVM performance tuning monitoring tools, in addition to the integrated VISUALVM and Jconsole, there are JPS, Jstack, Jmap, Jhat, Jstat and other small tools, this blog hope to play a useful, Let's start to understand the common tools f
Overview
When the system bugs need to locate the problem, knowledge, experience is the key foundation, the data is the basis, the tool is the use of knowledge processing data means. The data mentioned here include: Run log, exception stack, GC log, thread snapshot (threaddump/javacore file), heap dump Snapshot (heapdump/hprof file), etc. Using the appropriate virtual machine monitoring and analysis tools c
In addition to the integrated VISUALVM and Jconsole, the JVM also has small tools such as JPS, Jstack, Jmap, Jhat, Jstat, etc.Problems that may be encountered in development
OutOfMemoryError, Low memory
Memory leaks
Thread deadlock
Lock contention (lock contention)
The Java process consumes too much CPU
These problems may be overlooked by many people in their daily development
In addition to the integrated VISUALVM and Jconsole, the JDK itself provides performance tuning monitoring tools such as JPS, Jstack, Jmap, Jhat, and Jstat.In Java development, we sometimes encounter the following problems:OutOfMemoryError, Low memoryMemory leaksThread deadlockLock contention (lock contention)The Java process consumes too much CPU......These problems may be overlooked by many people in thei
JVM Introduction to Monitoring ToolsVISUALVM is a visual tool that integrates multiple JDK command-line tools to provide you with powerful analytical capabilities. All of this is free! The command-line tools It includes are jps,jstat,jmap,jinfo,jstack,jconsole, which are consistent with the standard version of the JDK.
large, you may need to add-j-xmx512m This parameter specifies the maximum heap memory, which is jhat-j-xmx512m-port9998/tmp/dump.dat. Then you can enter the host address in the browser: 9998 viewed:4. Jstat (JVM Statistical monitoring tool)Jstat [generaloption | outputoptions vmid[interval[s|ms] [count]]Vmid is the Java Virtual machine ID, which is generally the process ID on the Linux/unix system. Interva
The JDK provides us with a range of JVM performance monitoring and troubleshooting tools, which are documented here based on learning progress. Easy to read later1.JPS Virtual Machine Process ToolSimilar to the PS command in Linux systems for viewing virtual machine processes, the following features are commonly usedJps-l Show virtual machine process ID and proce
to the information currently crawled to further analysisSecond, JVISUALVMThe JDK comes with a JVISUALVM tool, which is used to monitor the CPU, memory, thread, and so on of the Java Runtime program. and monitor Java programs in a graphical way with remote monitoring capabilities.Pre-preparation1, upload tomcat to the virtual machine, WebApps under the existence of Prefteach package2, monitoring the
capacity of Eden District 88.2072462755091% used # Eden area usage from Space: # s Urvior1 Zone capacity = 71303168 (68.0MB) # Survior1 area capacity used = 3952576 (3.76947021484375MB) # Surviror1 zone used Situation free = 67350592 (64.23052978515625MB) # Surviror1 area remaining capacity 5.543338551240809% used # Survior1 area use proportional to Space: # Survior2 Zone capacity = 71303168 (68.0MB) # Survior2 area capacity used = 0 (0.0M B) # Survior2 area Use
As you know, the JDK itself provides many virtual machine monitoring tools to monitor virtual machine service information, such as Jps,jmap,jstack. Under win7 , sometimes executing these commands will report an " Access denied " error, such as:This problem usually occurs with commands that involve process PID. Workaround: When the cmd Command box is turned on, right-click Run as Administrator , such as:The
JDK itself comes with a lot of practical tools. The following are commonly used:1. JPs: displays all Virtual Machine Processes-Q: only ID numbers are listed.-M: ID, primary class, and parameters passed to the primary class-L: ID and full name of the main class-V: ID, primary class, and complete VM startup parameters
2. jstat: Virtual Machine statistics monitoring Reference: http://blog.163.com/yangshuo_qq
, generate a memory dump snapshot (heapdump file) of the virtual machine.5) JHAT:JVM Heap Dump Browser, which parses the Headdump file, establishes a http/html server that allows the user to view the results of the analysis on the browser6) Jstack:stack Trace for Java to generate a thread snapshot of the current moment of the virtual machine2. Visualization Tools1. Jconsle2. JVISULAVMRemote connection needs to be set for Java opt to use, see: http://www.cnblogs.com/Jtianlin/p/5021540.htmlJVM (4)
for remote monitoring tools.Options-Nr: When an existing RMI registry is not found, an internal RMI registry is not created.-P port number. The default value is 1099.-N rminame: jstatremotehost by default. If multiple jstatd services start on the same host, rminame uniquely identifies a jstatd service.-J jvm optionsJstatdThe following error is reported:
Cocould not create Remote Object Access Denied (Java.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.