Jmap (Memory Map for Java)

Source: Internet
Author: User

functionThe Jmap (Memory Map for Java) command is used to generate a heap dump snapshot (commonly known as a heaphump or dump file). If you do not use the Jmap command, there are some more "brute force" means to get a Java heap dump snapshot: Using the-xx:heapdumponoutofmemoryerror parameter, you can have the VM automatically generate a dump file after the Oom exception occurs, via-XX: The Heapdumponctrlbreak parameter allows the virtual machine to generate a dump file using the [Ctrl]+[break] key, or the dump file can be "intimidated" by the Kill-3 command sending process exit signal under the Linux system. Jmap's role is not just to get the dump file, it can also query the details of the Finalize execution queue, the Java heap, and the permanent generation, such as the space usage, which collector is currently used, and so on. Commandjmap [option] Vmid Description-dump: Generates a Java heap dump snapshot. The format is:-dump:[live,]format=b,file=<filename>, where the live sub-argument indicates whether to dump only the surviving object. -finalizerinfo: Displays the object in F-queue that waits for the finalizer thread to execute the Finalize method. Valid only under the Linux/solaris platform. -heap: Displays Java heap details, such as which collector to use, parameter configuration, generational status, and so on. Valid only under the Linux/solaris platform. -histo: Displays the object statistics in the heap, including the class, number of instances, and total capacity. -permstat: Displays the permanent memory status with ClassLoader as the statistical aperture. Valid only under the Linux/solaris platform. -F: Use this option to force a dump snapshot when the virtual machine process does not respond to the-dump option. Valid only under the Linux/solaris platform. ExampleJmap-dump:format=b,file=eclipse.bin 3500

Jmap (Memory Map for Java)

Related Article

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.