SYNOPSIS
jmap [ option ] pid
jmap [ option ] executable core
jmap [ option ] [server-id@]remote-hostname-or-IP
PARAMETERS
option
Options are mutually exclusive. Option, if used, should follow immediately after the command name.
pid
process id for which the memory map is to be printed. The process must be a Java process. To get a list of Java processes running on a machine, jps may be used.
executable
Java executable from which the core dump was produced.
core
core file for which the memory map is to be printed.
remote-hostname-or-IP
remote debug server's (see jsadebugd) hostname or IP address.
server-id
optional unique id, if multiple debug servers are running on the same remote host.
DESCRIPTION
jmap prints shared object memory maps or heap memory details of a given process or core file or a remote debug server. If the given process is running on a 64-bit VM, you may need to specify the -J-d64 option, e.g.:
jmap -J-d64 -heap pid
NOTE - This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools for Windows' needs to be installed to have these tools working. Also, the PATH environment variable should contain the location of jvm.dll used by the target process or the location from which the Crash Dump file was produced.
For example, set PATH=\jre\bin\client;%PATH%
OPTIONS
When no option is used jmap prints shared object mappings. For each shared object loaded in the target VM, start address, the size of the mapping, and the full path of the shared object file are printed. This is similar to the Solaris pmap utility.
-dump:[live,]format=b,file=
Dumps the Java heap in hprof binary format to filename. The live suboption is optional. If specified, only the live objects in the heap are dumped. To browse the heap dump, you can use jhat (Java Heap Analysis Tool) to read the generated file.
-finalizerinfo
Prints information on objects awaiting finalization.
-heap
Prints a heap summary. GC algorithm used, heap configuration and generation wise heap usage are printed.
-histo[:live]
Prints a histogram of the heap. For each Java class, number of objects, memory size in bytes, and fully qualified class names are printed. VM internal class names are printed with '*' prefix. If the live suboption is specified, only live objects are counted.
-permstat
Prints class loader wise statistics of permanent generation of Java heap. For each class loader, its name, liveness, address, parent class loader, and the number and size of classes it has loaded are printed. In addition, the number and size of interned Strings are printed.
-F
Force. Use with jmap -dump or jmap -histo option if the pid does not respond. The live suboption is not supported in this mode.
-h
Prints a help message.
-help
Prints a help message.
-J
Passes to the Java virtual machine on which jmap is run.
[root@SVTLINUX5 bin]# ./jmap -heap 25725
SOLARIS 环境64位用./jmap -J-d64 -heap 25725
Attaching to process ID 25725, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 23.7-b01
using thread-local object allocation.
Parallel GC with 3 thread(s)
Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 4127195136 (3936.0MB) 设置的最大堆
NewSize = 2062548992 (1967.0MB)
MaxNewSize = 2062548992 (1967.0MB)
OldSize = 5439488 (5.1875MB)
NewRatio = 2
SurvivorRatio = 8
PermSize = 21757952 (20.75MB)
MaxPermSize = 805306368 (768.0MB) 设置的最大永久带
G1HeapRegionSize = 0 (0.0MB)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 687603712 (655.75MB)
used = 141359256 (134.8106918334961MB)
free = 546244456 (520.9393081665039MB)
20.5582450375137% used
From Space:
capacity = 671154176 (640.0625MB)
used = 547370880 (522.0135498046875MB)
free = 123783296 (118.0489501953125MB)
81.55665264012303% used
To Space:
capacity = 687472640 (655.625MB)
used = 0 (0.0MB)
free = 687472640 (655.625MB)
0.0% used
PS Old Generation
capacity = 895156224 (853.6875MB)
used = 706629648 (673.8945465087891MB)
free = 188526576 (179.79295349121094MB)
78.93925429490172% used
PS Perm Generation
capacity = 271187968 (258.625MB)
used = 208066544 (198.42771911621094MB)
free = 63121424 (60.19728088378906MB)
76.72410598983507% used
阅读(1091) | 评论(0) | 转发(0) |