tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keeplearning <>
Subject RE: Thread Dumps/ Emailing Results...
Date Sat, 01 Nov 2008 18:22:03 GMT

Thanks for your reply, Chuck.

couple of quick questions:

1) I tried using following to mail the file as attachment (we are also using
MS Outlook):

mail -s "Subject:test" < test.log

But it sends the output in the body rather than as an attachment. I even
tried uuencode but still get in the body.

2) We used jstack before but it was not that useful. So, we returned to
using kill -3. Will following work?

nexec <server name> kill -3 <process id>

Do we need this full command even if i am logged in the server?

Thaks for your help

Caldarale, Charles R wrote:
>> From: keeplearning []
>> Subject: Thread Dumps/ Emailing Results...
>> So, do i need to supply process id with this command. Like:
>> kill -3 <process id>.
> That's one way to do it.  My preference is to use the jstack tool from the
> JDK, assuming you're running a 1.5 or 1.6 Sun JVM.  You still need the
> process id, and the JDK includes the jps tool which is easier than wading
> through the output of ps.  The JDK tools also work on Windows, whereas
> kill doesn't normally exist there.
>> Then does the output goes to catalina.out which is our
>> log file
> The output of kill -3 is sent to stdout or stderr (I forget which), which
> *may* be redirected to catalina.out, depending on your Tomcat
> configuration.  The jstack output goes to your command window, rather than
> any of Tomcat's files.
>> And do i need to be in specific directory to run
>> this command?
> No, as long as the command you're using (kill or jstack) is in your PATH.
>> 2) once the thread dumps are in catalina.out, how do i mail
>> the catalina.out as an attachment?
> Edit it first to remove everything but the stack trace.  (Another reason
> to use jstack.)  How you mail it depends on your mail client and what
> additional information you need to provide.  (I usually just insert the
> file as text, but then I'm using the corporate standard MS Outlook rather
> than any Linux mailer.)  If you really need to make the whole log
> available, posting it on a web site somewhere may be preferable to dumping
> it in an e-mail.
>  - Chuck
> 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:
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View this message in context:
Sent from the Tomcat - User mailing list archive at

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message