aspose file tools*
The moose likes Performance and the fly likes does java 7 support -XX:+HeapDumpOnCtrlBreak Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "does java 7 support -XX:+HeapDumpOnCtrlBreak" Watch "does java 7 support -XX:+HeapDumpOnCtrlBreak" New topic
Author

does java 7 support -XX:+HeapDumpOnCtrlBreak

Andy Werden
Greenhorn

Joined: Nov 21, 2011
Posts: 3
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

Joined: Feb 24, 2006
Posts: 6662
    
    5

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.


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Andy Werden
Greenhorn

Joined: Nov 21, 2011
Posts: 3
Still looking for a way to force a heap dump

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

Suggestions?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: does java 7 support -XX:+HeapDumpOnCtrlBreak