Troubleshooting Ruby Processes - Leveraging System Tools When the Usual Ruby Tricks Stop Working

Addison-Wesley Professional Ruby Series

Buy the PDF on Informit or read it online with Safari.

"Philippe's book yields knowledge of powerful UNIX tools for debugging ruby processes. It is a must read." Wayne E. Seguin, Engine Yard

Book Cover

This book introduces key system diagnostic tools to Ruby developers creating and deploying web applications. When programmers develop a Ruby application they commonly experience complex problems which require some understanding of the underlying operating system to be solved. Difficult to diagnose, these problems can make the difference between a project’s failure or success.

"Troubleshooting Ruby Processes does a wonderful job of explaining the details of how to use tools like lsof, strace and gdb, while maintaining a good focus on applying them to ruby and mongrel processes."Tammer Saleh, Thoughtbot

This short cut demonstrates how to leverage system tools available on Mac OS X, Linux, Solaris, BSD or any other Unix flavor. You will learn how to leverage the raw power of tools such as lsof, strace or gdb to resolve problems that are difficult to diagnose with the standard Ruby development tools. You will also find concrete examples that illustrate how these tools solve real-life problems in Ruby development. This expertise will prove especially relevant during the deployment phase of your application. In this way, should your production Mongrel cluster freeze and stop serving HTTP requests, it will not take you 2 days to figure out why!

"It's a useful book to read to learn why problems occur and which tools to solve the problem"Peter Cooper, Ruby Inside

1. Tools & Downloads

A collection of advanced troubleshooting tools you can use for Ruby:

gdb sign Download the gdb macros described in the book.

caller for all threads sign Ruby VM patch to get caller_for_all_threads (M.R.I 1.8.6).

system timer sign Native Gem providing reliable timeouts for Ruby (M.R.I 1.8).

DTrace sign Out-of-the-box Ruby on Rails instrumentation for DTrace.

2. Supplementory Articles

Some parts of this book assumes a basic UNIX knowledge as well as an overall understanding of modern operating systems. Newcomers to Mac OS X and the UNIX platform might benefit from some introductory material in this area, which is why I wrote the articles below. In fact I even bet that some long time UNIX users will find the content interesting: Personally I had a lot of fun writing these articles, especially for “In UNIX Everything is a File”.

UNIX Badge

caller for all threads sign

Original web site design by: JFX diz*web.