If you need to debug a process in a linux environment, the simplest yet very effective solution should be strace.
It can be easily installed with “yum install strace” or “apt-get install strace” depending on the type of Linux you’re on.
Here are some usage samples.
This will send strace output to a file until the strace process in interrrupted.
There are lots of additional parameters strace uses. I have mentioned only the most simple ones, you’re welcome to discover all other option to get the output you need.