0

I wanted to get the Thread Dump and Heap Dump of the process by its process name that is running in my local but in different Virtual Machine. I tried using the ThreadMXBean, as I read, it supports for the processes that runs in same VM. If it is not possible from java code, is there any alternative way to achieve the same in Windows environment(it would be better if it is in script form also). Thank You.

trincot
  • 317,000
  • 35
  • 244
  • 286
Gireesh Bhat
  • 139
  • 1
  • 1
  • 7
  • Do you mean a different Java Virtual Machine, which is an instance (running process) of the program `java.exe` (Windows) or `java` (others)? Or a 'hardware' Virtual Machine like VMware&ESXi, VirtualBox, Hyper-V, KVM, QEMU, Parallels, etc? – dave_thompson_085 Feb 23 '17 at 08:00
  • java virtual machine. I Just want to get the thread dump of some other process running in virtual machine. That task wan to achieve through java program – Gireesh Bhat Feb 23 '17 at 10:04

1 Answers1

0

You can get the IP of that virtual Machine, and then using any standard tool like VisualVM you can connect to the process running in that JVM. VisualVM gives lots of interesting debugging features, including thread dump.

AmanSinghal
  • 2,404
  • 21
  • 22