SUMMARY: vmstat and iostat



Thanks to all for their suggetion. Too many to list.
The solution is to use tee -a
man tee
-a Appends the output to the files rather than
overwriting them.

Another way is to use iostat -T d -xnczC thanks to Johan Hartzenberg.

My Question was:


We are having some performance issue on Solaris 9 running sendmail for
which i am planning to capture vmstat and iostat statictics for 3-4 hrs.
The problem is script is running fine it doesn't put timestamp like sar.
Here is what i am doing:
#! /bin/ksh

DATE=`date`
while true
do
echo "$DATE" >> report_vmstat
vmstat 10 | tee report_vmstat
done

But it still doesn't put timestamp. Any idea why its not printing date?
Also if you have a better option then this one to capture data from
vmstat and iostat or any other tool please do share with me.
Regards
shahb
_______________________________________________
sunmanagers mailing list
sunmanagers@xxxxxxxxxxxxxxx
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
_______________________________________________
sunmanagers mailing list
sunmanagers@xxxxxxxxxxxxxxx
http://www.sunmanagers.org/mailman/listinfo/sunmanagers