Looking at top output on my linux server, I see a root owned process that is always in S mode whenever I look. How can I find out when was the last time it actually ran on a cpu and did something?

Thanks!

link|improve this question
feedback

migrated from stackoverflow.com Jan 3 '11 at 19:24

This question came from our site for professional and enthusiast programmers.

1 Answer

Not terribly elegant, but you could run strace on it -- e.g. strace -ft -p PID and you won't get any output while it's sleeping. The -f will follow any forked child processes and the -t will prefix the output with the time of day (more t's = more precision). It can't look into the past but will show you the next time it does something (and what it's doing).

link|improve this answer
feedback

Your Answer

 
or
required, but never shown