strace

To see what a running process is doing:

strace -p 1234 -s 80

To trace only network calls:

strace -f -n trace=network -s 80 -o /home/khai/out -c -p 1234

To see only a trace of the open, read system calls, enter:

strace -e trace=open,read -p 22254 -s 80

To capture the output of strace into a file: (use -o option)

strace -e trace=open,read -p 22254 -s 80 -o debug.webserver.txt

To launch an executable and trace it:

strace /bin/foo
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License