-1

I understand that we can use killall -3 java to get the threaddump.

My question is: If multiple java processes are running, which process's thread dump is taken ? Or are thread dumps taken for all processes ?

Pavel
  • 1,519
  • 21
  • 29
Sruts
  • 88
  • 7

1 Answers1

0

Thread dumps aren't "taken" in the situation you describe. Java JVMs generally respond to the signal by writing the dump to stdout. It may be captured and stored, but that doesn't change the fundamental principle.

Consequently, you can signal all JVMs on a host to produce a thread dump if you wish.

In many cases, it's more productive to use a utility like jstack to collect the thread dump, because it will allow better control of where the dump is actually written.

Kevin Boone
  • 4,092
  • 1
  • 11
  • 15