---
title: "jvm工具使用"
author: "madding"
date: "2012-05-11T12:20:00Z"
tags: []
slug: "jvm"
draft: false
lastmod: "2012-08-31T10:08:57Z"
id: 1668498
url: "https://madding.iteye.com/blog/1668498"
---

查看java进程内存占用情况：

jmap -histo 29880 &gt; 29880.jmap.histo.txt

java进程heapdump操作：

jmap -dump:format=b,file=heap.bin 29880

java进程theaddump：

jstack -l 29880 &gt; 29880.jstack.txt

linux进程对应的线程（lwp）信息：

ps -eL -o "lwp,pid,pmem,pcpu" 29880 &gt; 29880.thread.txt

查看Class Loader

jmap –permstat 29880

查看java进程堆的相关信息

jmap -heap 29880