https://docs.oracle.com/en/java/javase/11/troubleshoot/diagnostic-tools.html#GUID-4D0B048D-F352-48B6-BCA4-BD31C9300B27 A) Troubleshoot with the jdb Utility 1. Remove references to SACoreAttachingConnector, SADebugServerAttachingConnector, and SAPIDAttachingConnector as they have been removed in JDK 9. Remove the following text: ------- The JDK also ships with several Serviceability Agent (SA) connectors that allow a Java language debugger to attach to a crash dump or hung process. This can be useful in determining what the application was doing at the time of the crash or hang. These connectors are SACoreAttachingConnector, SADebugServerAttachingConnector, and SAPIDAttachingConnector. ------- 2. Remove the section "Attach a Process" 3. Remove the section "Attach to a Core File on the Same Machine" 4. Remove the section "Attach to a Core File or a Hung Process from a Different Machine" B) The jinfo Utility 5. Remove these lines The jinfo utility can also use the jsadebugd daemon to query a process or core file on a remote machine. Note: The output takes longer to print in this case. 6. Modify these lines to use jhsdb jinfo instead of jinfo - In addition to getting information from a process, the jinfo tool can use a core file as input. + In addition to getting information from a process, the jhsdb jinfo tool can use a core file as input. - The path to the Java executable file and the core file must be specified as arguments to the jinfo utility, + The path to the Java executable file and the core file must be specified as arguments to the jhsdb jinfo utility, - $ jinfo java-home/bin/java core.29620 + $ jhsdb jinfo --exe java-home/bin/java --core core.29620 - The jinfo tool requires the binary from which the core file was generated. + The jhsdb jinfo tool requires the binary from which the core file was generated. C) The jmap Utility 7. Add the following line after the first line ("The jmap command-line utility prints memory-related statistics for a running VM or core file") For core file, use 'jhsdb jmap' 8. Remove these lines: The utility can also use the jsadebugd daemon to query a process or core file on a remote machine. The output takes longer to print in this case. 9. Modify these lines: - If the jmappid command does not respond because of a hung process, then the -F option can be used (on Oracle Solaris and Linux operating systems only) to force the use of the Serviceability Agent. + If the jmap command does not respond because of a hung process, then 'jhsdb jmap' option can be used to use the Serviceability Agent. - Depending on the parameter specified, the jmap -histo command can print the heap histogram for a running process or a core file. + The jmap -histo command prints the heap histogram for a running process. Use 'jhsdb jmap --histo' for a core file. - When the jmap -histo command is executed on a core file, the tool prints the size, count, and class name for each class. Internal classes in the Java HotSpot VM are prefixed with an asterisk (*). + When the 'jhsdb jmap --histo' command is executed on a core file, the tool prints serial number, number of instances, bytes, and class name for each class. Internal classes in the Java HotSpot VM are prefixed with an asterisk (*). - shows output of the jmap -histo command when it is executed on a core file. + shows output of the jhsdb jmap --histo command when it is executed on a core file. 10. Make appropriate modifications to the example. The latest output of jhsdb jmap --histo command is shown below: sudo /home/sharath/java/src/latest/jdk_1/build/linux-x86_64-server-fastdebug/images/jdk/bin/jhsdb jmap --exe /home/sharath/java/src/latest/jdk_1/build/linux-x86_64-server-fastdebug/images/jdk/bin/java --core core.16395 --histo Attaching to core core.16395 from executable /home/sharath/java/src/latest/jdk_1/build/linux-x86_64-server-fastdebug/images/jdk/bin/java, please wait... Debugger attached successfully. Server compiler detected. JVM version is 12-internal+0-adhoc.sharath.open Iterating over heap. This may take a while... Object Histogram: num #instances #bytes Class description -------------------------------------------------------------------------- 1: 11102 564520 byte[] 2: 10065 241560 java.lang.String 3: 1421 163392 java.lang.Class 4: 26403 2997816 * ConstMethodKlass 5: 26403 2118728 * MethodKlass 6: 39750 1613184 * SymbolKlass 7: 2011 1268896 * ConstantPoolKlass 8: 2011 1097040 * InstanceKlassKlass 9: 1906 882048 * ConstantPoolCacheKlass 10: 1614 125752 java.lang.Object[] 11: 1160 64960 jdk.internal.org.objectweb.asm.Item 12: 1834 58688 java.util.HashMap$Node 13: 359 40880 java.util.HashMap$Node[] 14: 1189 38048 java.util.concurrent.ConcurrentHashMap$Node 15: 46 37280 jdk.internal.org.objectweb.asm.Item[] 16: 29 35600 char[] 17: 968 32320 int[] 18: 650 26000 java.lang.invoke.MethodType 19: 475 22800 java.lang.invoke.MemberName D) The jstack Utility 11. Modify these lines - Use the jcmd utility, instead of jcmd utility to diagnose problems with JVM and Java applications. + Use the jcmd or jhsdb jstack utility, instead of jstack utility to diagnose problems with JVM and Java applications. - The jstack command-line utility attaches to the specified process or core file, and prints the stack traces of all threads that are attached to the virtual machine, including Java threads and VM internal threads, and optionally native stack frames. The utility also performs deadlock detection. + The jstack command-line utility attaches to the specified process, and prints the stack traces of all threads that are attached to the virtual machine, including Java threads and VM internal threads, and optionally native stack frames. The utility also performs deadlock detection. For core file use 'jhsdb jstack' 12. Remove these lines The utility can also use the jsadebugd daemon to query a process or core file on a remote machine. The output takes longer to print in this case. 13. Modify these lines Stack Trace from a Core Dump - Use the jstack command to obtain stack traces from a core dump. - To get stack traces from a core dump, execute the jstack command on a core file, as shown in the following example. - $ jstack java-home/bin/java core + Use the jhsdb jstack command to obtain stack traces from a core dump. + To get stack traces from a core dump, execute the jhsdb jstack command on a core file, as shown in the following example. + $ jhsdb jstack --exe java-home/bin/java --core core.16395 14. Modify these lines Mixed Stack - The jstack utility can also be used to print a mixed stack; that is, it can print native stack frames in addition to the Java stack. Native frames are the C/C++ frames associated with VM code and JNI/native code. - To print a mixed stack, use the -m option, as shown in the following example. - $ jstack -m 21177 + The jhsdb jstack utility can also be used to print a mixed stack; that is, it can print native stack frames in addition to the Java stack. Native frames are the C/C++ frames associated with VM code and JNI/native code. + To print a mixed stack, use the --mixed option, as shown in the following example. - sudo jhsdb jstack --mixed --pid 21177 E) Postmortem Diagnostic Tools 15. Remove these lines jdb utility Debugger support includes an AttachingConnector, which allows jdb and other Java language debuggers to attach to a core file. This can be useful when trying to understand what each thread was doing at the time of a crash. See The jdb Utility. 16. Modify these lines - jinfo utility - (postmortem use on Oracle Solaris and Linux operating systems only) + jhsdb jinfo utility - jmap utility - (postmortem use on Oracle Solaris and Linux operating systems only) + jhsdb jmap utility 17. Remove these lines jdb utility Debugger support includes an AttachingConnector, which allows jdb and other Java language debuggers to attach to a core file. This can be useful when trying to understand what each thread was doing at the time of a crash. See The jdb Utility. jsadebugd daemon (Oracle Solaris and Linux operating systems only) The Serviceability Agent Debug Daemon (jsadebugd) attaches to a Java process or to a core file and acts as a debug server. See The jsadebugd Daemon. Hung Processes Tools 18. Modify these lines jmap utility - On the Oracle Solaris and Linux operating systems, the -F option can be used if the process is hung. + jhsdb jmap option can be used if the process is hung. 19. Remove these lines jsadebugd daemon (Oracle Solaris and Linux operating systems only) The Serviceability Agent Debug Daemon (jsadebugd) attaches to a Java process or to a core file and acts as a debug server. See The jsadebugd Daemon. Monitoring Tools 20. Modify these lines jmap utility - This utility can get memory map information, including a heap histogram, from a Java process, a core file, or a remote debug server. See The jmap Utility. + This utility can get memory map information, including a heap histogram, from a Java process, a core file. See The jmap Utility. jstack utility - This utility can get Java and native stack information from a Java process. On the Oracle Solaris and Linux operating systems, the utility can also get the information from a core file or a remote debug server. See The jstack Utility. + This utility can get Java and native stack information from a Java process. The utility can also get the information from a core file. See The jstack Utility. 21. Remove this section The jsadebugd Daemon The Java Serviceability Agent Debug Daemon (jsadebugd) attaches to a Java process or to a core file and acts as a debug server. This utility is currently available only on the Oracle Solaris and Linux operating systems. Remote clients such as jstack, jmap, and jinfo can attach to the server using Java Remote Method Invocation (RMI). 22.