Skip to Main Content
Troubleshooting Ruby Processes: Leveraging System Tools when the Usual Ruby Tricks Stop Working
book

Troubleshooting Ruby Processes: Leveraging System Tools when the Usual Ruby Tricks Stop Working

by Philippe Hanrigou
October 2007
Intermediate to advanced content levelIntermediate to advanced
58 pages
59m
English
Addison-Wesley Professional
Content preview from Troubleshooting Ruby Processes: Leveraging System Tools when the Usual Ruby Tricks Stop Working

Section #3. lsof

What Is It?

lsof stands for “LiSt Open Files.” This command seems deceptively simple: It lists information about files opened by processes on a UNIX box.

Despite its (apparent) modest mission statement, lsof is actually one of the most powerful and useful UNIX commands. Its raw power comes from one of UNIX’s design principle often described as “in UNIX everything is a file.”3 What this means is that the lsof concept of an open file not only covers regular files but also the following:

• Directories

• Streams or network files (for example, Internet or UNIX domain sockets and NFS files)

• Native libraries (for example, .so or .dylib dynamic libraries linked to a process)

• Block and character special files (for example, disk volume, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Ruby Closures

Mastering Ruby Closures

Benjamin Tan Wei Hao

Publisher Resources

ISBN: 9780321544681