#!/bin/bash # # Report_Stats - Generates Rpt from Captured Perf Stats # ############################################################ # # Set Script Variables # REPORT_FILE=/home/tiandi/Documents/capstats.csv TEMP_FILE=/home/tiandi/Documents/capstats.html # DATE=`date +%m/%d/%y` # MAIL=`which mutt` MAIL_TO=tiandi # ###############################################################3 # # Create Report Header # echo "

Report for $DATE

" > $TEMP_FILE echo "" >> $TEMP_FILE echo "" >> $TEMP_FILE echo "" >> $TEMP_FILE # ############################################################### # # Place Performance Stats in Report # cat $REPORT_FILE | gawk -F, '{ printf "", $1, $2, $3; printf "\n\n", $4, $5, $6; }' >> $TEMP_FILE # echo "
DateTimeUsersLoadFree Memory%CPU Idle
%s%s%s%s%s%s
" >> $TEMP_FILE # ################################################################ # # Mail Performance Report & Clean up # #$MAIL -a $TEMP_FILE -s "Performance Report $DATE" #-- $MAIL_TO < /dev/null # #rm -r $TEMP_FILE #