How to trace a running process?

Using strace one can trace the system calls being executed by a running process. To stop the strace press control-C To display the system calls being executed $ strace -p <pid> or To display a summary of system calls being executed $ strace -cfo <logfile> -p <pid> Example: In this example smon process was being…

How to trace system calls?

Using strace (linux)/truss (AIX) one can trace the system calls as program executes. It can be useful in identifying where a program identify an issue depending on the situation. Example below shows output when strace is called for echo $ strace echo “Hello” execve(“/bin/echo”, [“echo”, “Hello”], [/* 42 vars */]) = 0 — shows process…