> From: Christopher Schultz [mailto:[EMAIL PROTECTED] > Subject: Re: Thread Dumps/ Emailing Results... > > I have written a script to check for OOMs by checking catalina.out > for "OutOfMemoryError". When such an error is detected, I run the > following commands (apologies for the line wrapping):
An easier way to get the heap dump on a modern HotSpot JVM is to add the command-line option: -XX:+HeapDumpOnOutOfMemoryError Also, in JDK 6 and above, there's another intriguing option: -XX:OnOutOfMemoryError="<command>" The above will run an external command to do whatever you deem appropriate, such us running the thread dump script you provided. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]