Introduction to the built-in tools in JDK5.0

Source: Internet
Author: User
Tags garbage collection memory usage versions jconsole linux

JDK5.0 has added Jstack, Jconsole, Jinfo, Jmap, Jdb, Jstat, JPS, and here's a brief introduction to these tools: Jstack-If the Java program crashes to generate core files, The Jstack tool can be used to obtain information about the Java stack and native stack of core files, making it easy to know how Java programs crash and where problems occur in the program. In addition, the Jstack tool can also be attached to a running Java program, seeing the Java stack and native stack of Java programs that were running, and jstack is useful if the Java program that is running now renders a hung state. This is only available in the Solaris and Linux JDK versions.

Jconsole–jconsole is a real-time graphical monitoring tool based on Java Management Extensions (JMX), which leverages the JMX instructions built into the JVM to provide real-time performance and resource monitoring, including the memory usage of Java programs , Heap size, the state of the thread, the allocation state of the class, and the space usage, and so on.

Jinfo–jinfo can know the configuration information of the crashed Java application from the core file, which is only available in the Solaris and Linux JDK versions.

Jmap–jmap can obtain a specific memory match from a core file or process, including heap size, Perm size, and so on, which is only available in the Solaris and Linux JDK versions.

JDB–JDB is used for real-time debugging of core files and running Java processes, which contains a wealth of commands to help you debug, and its functionality is very similar to the DBX in Sun Studio, but Jdb is specifically intended for use with Java applications.

Jstat–jstat leverages JVM-built directives to perform real-time command-line monitoring of the resources and performance of Java applications, including monitoring of heap size and garbage collection, and so on.

JPS–JPS is used to view the specific state of all processes within the JVM, including the process ID, the path to the process initiation, and so on.

In addition, there are some other accompanying tools not listed here, such as heap analysis Tool, kill-3 method, and so on, which before JDK5.0, are also very useful performance tuning tools, you can refer to the corresponding documentation to learn.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.