jmap -help Usage: jmap [option] <pid> (to connect to running process) jmap [option] <executable <core> (to connect to a core file) jmap [option] [server_id@]<remote server IP or hostname> (to connect to remote debug server)
where <option> is one of: <none> to print same info as Solaris pmap -heap to print java heap summary -histo[:live] to print histogram of java object heap; if the "live" suboption is specified, only count live objects -clstats to print class loader statistics -finalizerinfo to print information on objects awaiting finalization -dump:<dump-options> to dump java heap in hprof binary format dump-options: live dump only live objects; if not specified, all objects in the heap are dumped. format=b binary format file=<file> dump heap to <file> Example: jmap -dump:live,format=b,file=heap.bin <pid> -F force. Use with -dump:<dump-options> <pid> or -histo to force a heap dump or histogram when <pid> does not respond. The "live" suboption is not supported in this mode. -h | -help to print this help message -J<flag> to pass <flag> directly to the runtime system
参数: option: 选项参数。 pid: 需要打印配置信息的进程ID。 executable: 产生核心dump的Java可执行文件。 core: 需要打印配置信息的核心文件。 server-id 可选的唯一id,如果相同的远程主机上运行了多台调试服务器,用此选项参数标识服务器。 remote server IP or hostname 远程调试服务器的IP地址或主机名。
option no option: 查看进程的内存映像信息,类似 Solaris pmap 命令。 heap: 显示Java堆详细信息 histo[:live]: 显示堆中对象的统计信息 clstats:打印类加载器信息 finalizerinfo: 显示在F-Queue队列等待Finalizer线程执行finalizer方法的对象 dump::生成堆转储快照 F: 当-dump没有响应时,使用-dump或者-histo参数. 在这个模式下,live子参数无效. help:打印帮助信息 J:指定传递给运行jmap的JVM的参数