Month: December 2010

  • Using strace to attach to a multi-threaded process (like a JVM/Java)…

    When using strace to attach to a process that is running many threads, use the following format for a system call summary: strace -f -c -p PID -o /tmp/outfile.strace To run a trace without a summary, which will result in voluminous amounts of space, omit the ‘-c’: strace -f -p PID -o /tmp/outfile.strace This will […]

  • Tomcat troubleshooting – Thread Stack Trace

    One of the best troubleshooting tools when using tomcat is to cause the JVM to print a thread stack trace for each current thread. This will provide insight into what all threads are currently doing. Note that if you wait until there is a problem to take the first stack trace, it will be very […]