#!/bin/ksh SAMPLE_TIME=300 while true do iostat ${SAMPLE_TIME} 2 > /tmp/tmp1 COUNT=`cat /tmp/tmp1|wc -l` COUNT2=`expr $COUNT / 2` # This script is intended to run starting # at 7:00 AM EST Until midnight EST cat /tmp/tmp1|sed 1,${COUNT2}d | awk\ '{ printf("%s %s %s\n", $1, $5, 6) }'\ | while read HDISK VMSTAT_IO_R VMSTAT_IO_W do if (echo $HDISK|grep -cq hdisk );then YEAR=`date +"%Y"` MONTH=`date +"%m"` DAY=`date +"%d"` HOUR=`date +"%H"` MINUTE=`date +"%M"` sqlplus -s / <