Tracing System Calls

If you want to know what exactly a program is doing, e.g. to find out why it's using 50% cpu right now, you can use the strace command:

strace -r -fF -T -p `pidof someprogram`

As always, you can find out more about the usage with man strace. It often does not respond to Ctrl-C in my experience, which is why I often kill it. killall -QUIT strace

And it also often forgets to restart the program it traced, so try a killall -CONT  someprogram.

No comments:

Post a Comment

I appreciate comments. And I do read them.