Debugging
lsof - List open files.
List information about files opened by processes on a UNIX box.
Include details about pid1
and pid2
.
Exclude pid3
Files opened by all processes executing a command starting with ruby
.
List processes that have the /path/to/file
file open.
What files are keeping /dev/sda1
busy.
All networking related to ports 50-5000
Inspect Internet connections for Ruby processes. -a
is used to AND
selections.
Puts lsof
in repeat mode. There lsof
lists open files as selected by other options, delays t
seconds (default fifteen), then repeats the listing, delaying and listing repetitively until stopped by a condition defined by the prefix to the option.
If the prefix is a -
, repeat mode is endless and lsof
must be terminated with an interrupt or quit signal.
If the prefix is +
, repeat mode will end the first cycle no open files are listed and of course lsof
is stopped with an interrupt or quit signal. When repeat mode ends because no files are listed, the process exit code will be zero if any open files were ever listed; one, if none were ever listed.
Specifies that lsof
should produce terse output with process identifiers only and no header. The output is piped to kill.
strace
Trace system calls and signals.
See where a library was loaded and what its associated directory lookup order is.