From: Ron M Date: 2005-11-05T06:26:11+09:00 Subject: Getting a stack trace of a running Ruby program. Is there a way of displaying the stack trace of a running ruby program without killing it? Java virtual machines(*) will show the stack trace(s) of a running program if you send them a QUIT signal (or on windows ) without stopping the program. On Linux, the "pstack" program gives you the same capabilities for C programs. This is useful when a program runs for days and gets gradually slower. By periodically sending QUIT signals you can essentally poll the program's stack to see where it's getting slow. Is there any way to do similar in Ruby? Even if I need to attach using GDB, it would help me - but I'd need someone to point me to what data structures I should look at with the debugger. Otherwise, I think it'd be a really nice feature if, like java, a QUIT signal could show the stack trace(s) of the existing nthread(s) without killing an application Ron * http://java.sun.com/developer/technicalArticles/Programming/Stacktrace/ * http://linuxcommand.org/man_pages/pstack1.html