Report Process Information (Help me)

I need a script to record top 5 processes to a file. I need the timestamp, cpu and memory utilization along with the process ID.

Thanks in advance!

top 5 processes by what criteria ??

If you use 'top' command you observe those processes change their positions quite often as function of time and processing.