Sometimes it is useful to see what system calls a compiled program is making. strace is a great utility to use for this, here is an example:
The command above will run 'dig somedomain.com' and put all the system calls into the output file /tmp/strace.output.
strace -f -s 500 -o /tmp/strace.output dig somedomain.com
The command above will run 'dig somedomain.com' and put all the system calls into the output file /tmp/strace.output.