Multiple choice technology performance

Which command is used to take java core dump?

  1. kill -3

  2. kill -6

  3. kill -9

  4. kill -t

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The 'kill -3' command sends a SIGQUIT signal to a Java process, which triggers a thread dump and core dump that can be analyzed for debugging. Kill -6 is SIGABRT, kill -9 is SIGKILL (forceful termination without dump), and kill -t is not a standard signal for core dumps.

AI explanation

On Unix/Linux, sending signal 3 (SIGQUIT) to a running JVM process with kill -3 causes the JVM to print a full thread dump (stack traces of all threads, lock/monitor info) to its standard output or log — this is the conventional command referenced when people colloquially say "take a Java core dump," even though technically it's a thread dump rather than a full memory core dump. kill -6 (SIGABRT) would typically terminate the process and may trigger an OS-level core file depending on configuration, but isn't the standard diagnostic command for this purpose. kill -9 (SIGKILL) forcibly terminates the process without any dump. kill -t isn't a valid standard signal option. So kill -3 is the recognized command for this task.