strace
strace command is used to trace system calls. This is useful to see what a process is doing.
To see what a process doing, run
1 |
strace -p PID_HERE |
To run a command and strace
1 |
strace cat 1.txt |
Debug apache start up
1 2 |
strace -Ff -o output.txt -e open /etc/init.d/httpd restart cat output.txt | grep '= -1' |