
Troubleshooting Ruby Processes
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
This is the eBook version of the printed book.
This short cut 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. 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!
All prices
More details
Person
Philippe Hanrigou is a software engineer, architect, and consultant. He is interested in lots of topics around software development but primarily focuses on designing enterprise software-understanding what makes a good design and implementing practices that encourage it. He has over ten years of experience developing enterprise software and web applications, mostly in Java.
For the last year he has enthusiastically embraced Ruby and used it to deliver large enterprise systems as a ThoughtWorks consultant. Philippe continually seeks ways to improve the state of the software craft and found agile methodologies to be especially efficient and rewarding for developing enterprise software. He spent a great deal of the last four years sharpening his expertise in and advocating agile methodologies.
Content
What This Shortcut Covers
Ruby Troubleshooting: The Usual Suspects
raise, puts and debug()
irb or script/console
Writing a Test
Log Files
Sending Signals
Debugger and Breakpointer
Lsof
What is It?
Usage
Typical Usage Scenarios
Combining Multiple Selections
Concrete Examples Using lsof to Troubleshoot a Problem with a Ruby Process
Checking that a Mongrel Cluster is Up and Listening on the Right Ports
Checking that You Are Using a Native Database Driver
Detecting Connection Leaks
Exploring Other Tricks
Exploring Other lsof Options
Repeat Mode
Field Output
Terse Output
What is lsof Good For?
strace
What is It?
Interpreting strace Output
How Do I Find Out About a Specific System Call?
What is strace Good For?
Some Concrete Examples
Hanging Mongrel
Where Did That Library Come From? Peeking at the Load Path
Permission Denied
Other Interesting strace Options
Filtering Options
Tracing Child Processes
Basic System Level Profiling
strace Siblings
Mac OS X
Solaris and OpenSolaris
BSD
Windows
Linux
gdb
The Basics: Attaching to a Running Process and Getting the C-Level Backtrace
Raising a Ruby Exception from gdb to Get the Ruby Stack Trace
Easy Access to your gdb Tricks: Define Macros in .gdbinit
Pushing the Envelope: Evaluate Arbitrary Ruby Code from gdb
A Ruby Interpreter Within gdb
Using gdb Inline Documentation
Learning about Ruby Interpreter Internals
What is gdb Good For?
A Classic Gotcha: Unattachable Processes
Conclusion
Acknowledgments
About the Author
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.
File format: ePUB
Copy protection: Watermark-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Use a reading software that can process the file format ePUB: e.g., Adobe Digital Editions or FBReader – both free (see eBook Help).
- Tablet/Smartphone (Android; iOS): Before downloading, install the free app Adobe Digital Editions (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePUB works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Watermark-DRM, a „soft” copy protection. This means that there are no technical restrictions to prevent illegal distribution. However, there is a personalised watermark embedded in the eBook that can be used to identify the purchaser of the eBook in the event of misuse and to provide evidence for legal purposes.
For more information, see our eBook Help page.