strace
------
strace allows you to attach to a process and watch every system call that the process executes. It is very helpful for tracking down exactly what a program is doing without having to use gdb. It is run like this (use the -f option to strace forks):
strace -tt -o log.txt -p
For an example run this:
strace -tt "uptime"
lsof
---
Another cool command is the "lsof" command. It will give you a list of open files (including sockets) for a process.
lsof -p 3387
