How to get a core dump on Windows NT?
The java process is running as a NT service, so I think I can't use the ctrl+break option.
I need to have this dump generated both on demand and also when the JVM crashes?
I have used IBM's core dump analyzer to analyze the core dumps generated by Websphere's JVM. Would this work for a Sun JVM as well?
Are there any other better core dump analysis tools available?
Your help is appreciated.
Thanks,
-Maqbool.
# 1
What do you mean with core dump? I don't know if it is possible to get a real core dump on Windows.
But if you mean to generate a thread dump, you can use this little cmd line tool:
http://www.latenighthacking.com/projects/2003/sendSignal/
beware if you use a remote desktop connection you need to start the console tool with:
mstsc.exe /console
otherwise you would lack sufficient rights to send the signal to the java vm.
The IBM tools usually don't work with the stuff the Sun VM dumps. You can use my little tool TDA (https://tda.dev.java.net) or Samurai (http://yusuke.homeip.net/samurai/?english) for analyzing the threads dumps.
If you want to generate Heap-Dumps and are using jdk 1.6 you can use the jmap utility. For 1.5 this is only available for unix/linux. If you want the VM to generate a Heap-Dump automatically on OOM add the option "-XX:+HeapDumpOnOutOfMemoryError" to your VM parameters, this param is supported in 1.6, 1.4.2_12 and higher and 1.5.0_06 and higher.
For analyzing the heap dumps you can either use the jhat utility which is included in recent JDKs from Sun. Or you can use the SAP Memory Analyzer (https://www.sdn.sap.com/irj/sdn/wiki?path=/display/Java/Java+Memory+Analysis). Some of the commercial profilers also have support for parsing the hprof files (Yourkit Profiler, JProfiler,...)
- Ingo
Message was edited by:
inro (forgot the sap-memory-analyzer link)
inroa at 2007-7-12 19:15:12 >

# 2
Ingo,
Thanks a lot for the helpful information. I got stuck into a couple of other things and I am still trying to get those done.
I'll update the post as soon as I get a chance to work with the tools you suggested.
Thanks again for your prompt response.
Regards,
-Maqbool.