Script to note CPU and Memory Utilization

Hi,

I need to write a script which would take the CPU and Memory usage at an interval of 10 mins. I tried using sar, but that does not solve my purpose.

Its not only one system that i have, but approximately 10 server from where i need to achive this date.

Can anyone share a script or idea to achieve my purpose.

-Siddhesh.K

Go with top

while [ 1 ]
do
        for host in $(cat hostlist)
        do
                ssh username@${host} "top -n 4" >> outfile.${host} 2>error_log
        done
        sleep 600
done