This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

does java 7 support -XX:+HeapDumpOnCtrlBreak

 
Andy Werden
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Need to get a heap dump from a running app (tomcat) on JDK 1.702. Kill -3 does trigger some info to catalina.out but does not produce heap dump. Added -XX:+HeapDumpOnCtrlBreak and got


Unrecognized VM option 'HeapDumpOnCtrlBreak'

What's the trick?
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to code ranch Andy

The -XX options are developer options and are subject to change between versions without any notice. It could have been dropped.

Application servers like JBOSS and Weblogic provide options to obtain thread dumps. You can try those servers if that is an option. Else you should be able to use JMX beans and JConsole to get the thread dumps. Someone has spent time writing a java class that pokes these beans -

http://www.java2s.com/Code/Java/Development-Class/ThisFullThreadDumpclassdemonstratesthecapabilitytogetafullthreaddumpandalsodetectdeadlockremotely.htm

I have not used these myself, but they may help you.
 
Andy Werden
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still looking for a way to force a heap dump

JVM (tomcat) is running behind a firewall; unable to get Jconsole to connect

Suggestions?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic