Java Performance Monitoring Tools

Source: Internet
Author: User

1. Questions

OutOfMemoryError: Insufficient memory;

Memory leaks

Thread deadlock

Lock Competition (lock contention)

Java consumes too much CPU

2. Java Common Health Tools

JPS (Java Virtual Machine Process Status tool) monitors JVM process state information

Use format:

JPS [Options] [HostID]

-M: output parameters that pass in the Main method

-L: Displays the fully qualified name of the main class or Jar

-V: Displays the parameters specified for the JVM virtual machine


Jstack : View the thread stack information within a Java process;

Use format:

jstack [Options] pid

-L Long Listings: The output of the completion of the lock information;

-M: Mixed mode, which outputs the Java stack and C + + stack information


Jmap and Jhat:

Jmap: JVM Memory map to view heap RAM usage

Jhat: Java Heap Analysis tool

Use format:

Jmap [Options] pid

-HEAP: Verbose heap memory space usage state information

-histo[:live] View the number of objects in the heap memory, the size of the statistical results;


Jstat : JVM Statistics monitoring Tool

Jstat-<option> [-t] [-h<lines>] <vmid> [<interval> [<count>]

Where <option> is the option that must be provided, all available options can be listed using Jstat-options;

-class

-compiler

-gc

-gccapacity

-gccause

-gcnew

-gcnewcapacity

-gcold

-gcoldcapacity

-gcpermcapacity

-gcutil

-printcompilation

Field Meaning:

s0c, s1c, s0u, S1U:C represents the capacity, U represents the amount of use;

EC, capacity and amount of eu:eden area;

OC, OU

PC, PU

YGC, YGT: GC times and time-consuming in the Cenozoic;

FGC, Fgct:full GC frequency and time-consuming;

GCT:GC total time-consuming;


Two GUI tools: Jconsole, JVISUALVM


Java Performance Monitoring Tools

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.