- lsof -nPp <pid>
- tcpdump
- write the data to a file, load it up in wireshark
- strace, trace systems calls and signals (jump into kernelspace)
- SIGVTALRM, ruby 1.8 every 10msec to switch threads (green threads)
- posix-spawn instead of fork-exec, check out posix-spawn gem
- ltrace
– ltrace -c ruby foo.rb # summary mode