public
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
$ jirb
irb(main):001:0> load 'jruby_thread_dump.rb'
 
# Elsewhere...
$ kill -USR2 <pid>
 
Ruby Thread Dump
 
Thread[SIGUSR2 handler,9,system]
 
Thread[main,5,main]
from /Users/nicksieger/.irbrc:21:in `readline'
from /Users/nicksieger/Projects/ruby/jruby/lib/ruby/1.8/irb/input-method.rb:97:in `gets'
from /Users/nicksieger/Projects/ruby/jruby/lib/ruby/1.8/irb.rb:140:in `eval_input'
from /Users/nicksieger/Projects/ruby/jruby/lib/ruby/1.8/irb.rb:271:in `signal_status'
from /Users/nicksieger/Projects/ruby/jruby/lib/ruby/1.8/irb.rb:139:in `eval_input'
from org/jruby/RubyProc.java:268:in `call'
from org/jruby/RubyProc.java:228:in `call'
from /Users/nicksieger/Projects/ruby/jruby/lib/ruby/1.8/irb/ruby-lex.rb:189:in `buf_input'
from /Users/nicksieger/Projects/ruby/jruby/lib/ruby/1.8/irb/ruby-lex.rb:104:in `getc'
from /Users/nicksieger/Projects/ruby/jruby/lib/ruby/1.8/irb/slex.rb:206:in `match_io'
from /Users/nicksieger/Projects/ruby/jruby/lib/ruby/1.8/irb/slex.rb:76:in `match'
from /Users/nicksieger/Projects/ruby/jruby/lib/ruby/1.8/irb/ruby-lex.rb:287:in `token'
from /Users/nicksieger/Projects/ruby/jruby/lib/ruby/1.8/irb/ruby-lex.rb:263:in `lex'
from /Users/nicksieger/Projects/ruby/jruby/lib/ruby/1.8/irb/ruby-lex.rb:234:in `each_top_level_statement'
from org/jruby/RubyKernel.java:1418:in `loop'
from /Users/nicksieger/Projects/ruby/jruby/lib/ruby/1.8/irb/ruby-lex.rb:230:in `each_top_level_statement'
from org/jruby/RubyKernel.java:1190:in `catch'
from /Users/nicksieger/Projects/ruby/jruby/lib/ruby/1.8/irb/ruby-lex.rb:229:in `each_top_level_statement'
from /Users/nicksieger/Projects/ruby/jruby/lib/ruby/1.8/irb.rb:154:in `eval_input'
from /Users/nicksieger/Projects/ruby/jruby/lib/ruby/1.8/irb.rb:71:in `start'
from org/jruby/RubyKernel.java:1190:in `catch'
from /Users/nicksieger/Projects/ruby/jruby/lib/ruby/1.8/irb.rb:70:in `start'
from /Users/nicksieger/Projects/ruby/jruby/bin/jirb:13:in `(root)'
jruby_thread_dump.rb
Ruby
1 2
require 'jruby'
org.jruby.RubySignal.send :registerThreadDumpSignalHandler, JRuby.runtime

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.