Capture running process for 2 hours with an interval of 10 sec

Hi,

Can any one help me on this.

How to capture the running process for two hours with an interval of 10 sec.

Thanks in andvance