#!/bin/bash
HOUR=`date +"%D %T"`
echo " Storage Capacity Utilization Report - ${HOUR} " >storage_server_daily_status.txt
echo " ------------------------------------------------------- " >>storage_server_daily_status.txt
echo " " >>storage_server_daily_status.txt
echo "PURE storage capacity utilization" >>storage_server_daily_status.txt
echo "*********************************" >>storage_server_daily_status.txt
echo " " >>storage_server_daily_status.txt
echo "Server Name -1" >>storage_server_daily_status.txt
echo " " >>storage_server_daily_status.txt
ssh Boobi@server1.boobi.com purearray list --space >>storage_server_daily_status.txt
echo " " >>storage_server_daily_status.txt
echo " " >>storage_server_daily_status.txt
echo "Server Name -2" >>storage_server_daily_status.txt
echo " " >>storage_server_daily_status.txt
ssh Boobi@server2.boobi.com purearray list --space >>storage_server_daily_status.txt
echo " " >>storage_server_daily_status.txt
echo " " >>storage_server_daily_status.txt
#echo "---------------------------------------------------------------------------------------------" >>storage_server_daily_status.txt
echo "NetApp storage capacity utilization" >>storage_server_daily_status.txt
echo "***********************************" >>storage_server_daily_status.txt
#out=`ssh Boobi@netappserver1.boobi.com purearray list --space`
#out1=`ssh Boobi@netappserver2.boobi.com purearray list --space`
#out2=`ssh 10.10.10.10 storage aggregate show`
echo " " >>storage_server_daily_status.txt
#out2=`ssh 10.10.10.10 storage aggregate show >>storage_server_daily_status.txt`
echo "Server 1" >>storage_server_daily_status.txt
echo " " >>storage_server_daily_status.txt
ssh 10.10.10.10 storage aggregate show -fields aggregate, size, volcount, node, availsize, usedsize, state, percent-used >>storage_server_daily_status.txt
#out3=`ssh 10.10.10.10 storage aggregate show >>storage_server_daily_status.txt`
echo "Server-2" >>storage_server_daily_status.txt
echo " " >>storage_server_daily_status.txt
ssh 10.10.10.10 storage aggregate show -fields aggregate, size, volcount, node, availsize, usedsize, state, percent-used >>storage_server_daily_status.txt
echo " " >>storage_server_daily_status.txt
echo "Server-1 - Volume Details" >>storage_server_daily_status.txt
echo " " >>storage_server_daily_status.txt
ssh 10.10.10.10 volume show >>storage_server_daily_status.txt
echo "Server-2 - Volume Details" >>storage_server_daily_status.txt
echo " " >>storage_server_daily_status.txt
ssh 10.10.10.10 volume show >>storage_server_daily_status.txt
echo "------------------------------------------------------------------------------------------------" >>storage_server_daily_status.txt
echo "This is an automated e-mail please do not reply and find the attachement for better view, Thanks!." >>storage_server_daily_status.txt
#echo "Thanks" >>storage_server_daily_status.txt
#echo "This is an automated e-mail please do not reply" >>storage_server_daily_status.txt
#echo $out
#echo $out1
#echo "$out2"
#echo ${out3}
#echo "\"$out2\""
#echo "$out2" >> storage_server_daily_status.txt
#echo "Executed time [$HOUR] " >> storage_server_daily_status.txt
#echo "Please find the attached storage server status report for ${HOUR} " | mail -v -s "Storage Status Daily Report - Reg" -a storage_server_daily_status.txt boobalan@boobi.com
#echo -e "\t\t\t\t\tStorage Capacity Utilization Report - ${HOUR}\t\t\t\t\t\n\t\t\t\t\t--------------------------------------------------------------------------\n\nPURE storage capacity utilization\n\n${out}\n\n${out1}\n\n__________________________________________________________________________________\n\nNetApp storage capacity utilization\n\n\"$out2\"\n\n__________________________________________________________________________________\n\n" | mail -v -s "Storage Capacity Utilization Daily Reports - Reg" boobalan@boobi.com
#echo -e " storage report $(cat storage_server_daily_status.txt) " | mail -v -s "test" boobalan@boobi.com
#cat storage_server_daily_status.txt | mail -v -s "test" boobalan@boobi.com
#below line is working
tr -d '\015' < storage_server_daily_status.txt | mail -v -s "Storage Capacity Utilization Daily Reports - Reg" -a storage_server_daily_status.txt boobalan@boobi.com
----------------------------------------
0 Comments