ps aux | grep python
strace -p <pid_from_above>
This will show you all the system calls being executed. In my case it was SIGKILL which was killing the process. Actually god itself was executing it since the process was detaching from it and was trying to run as a daemon.
You can use strace for the following use cases:
- To check the system calls done by a command. This is helpful to know what all libraries the binary is trying to access.
strace echo hellofor fun and check out the output.
- You can capture the output of strace to a file by passing -o flag and then use grep for analysis.
strace -o output.txt ping 184.108.40.206
- Another use case for strace is when any of your application is running unexpectedly slow. Just pass -c flag to strace and you'll get statistics of all the system calls executed. You can also pass -p with -c to supply a pid.
strace -c ping 220.127.116.11