Skip to content

Instantly share code, notes, and snippets.

@dmitryame
Created May 11, 2011 15:46
Show Gist options
  • Save dmitryame/966715 to your computer and use it in GitHub Desktop.
Save dmitryame/966715 to your computer and use it in GitHub Desktop.
jruby hacks
#jruby hacks
jps -ml #show java processes running
jstack <pid> #get a jvm stack info
jruby -J-Djruby.reify.classes=true # a flag that tell jruby to compile ruby classes to real (matching) java classes
jvisualvm #great profiling tool
ab -n 1000 -c 10 http://localhost:3000 #apache bench command to load up a server
jruby -S warble executable compile war # creating executable war
java -jar myapp.war #run the executable war
java -jar myapp.war --help
# hotline [email protected]
#jruby -S rails new myapp --template http://jruby.org
#produce a heap dump on running tomcat
jmap -dump:live,format=b,file=heap.bin <pid>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment