Another one of the many daily reports I run reports on the current time remaining on the FAST VP data relocation times for all of our arrays. I also make a single backup copy of the report to show the times for the previous day so I can get a quick view of progress that was made over the previous 24 hours. Both reports are presented side by side on my intranet report page for easy comparison.
I made a post last year regarding how to deal with long running FAST VP data relocation jobs (http://emcsan.wordpress.com/2012/01/18/long-running-fast-vp-relocation-job/), and this report helps identify any arrays that could be falling behind. If your estimated completion time is longer than the time window you have defined for your data relocation job you may need to make some changes, see my previous post for more information about that.
You can get the current status of the data relocation job at any time by running the following command:
naviseccli -h [array_hostname] autotiering -info -state -rate -schedule -opStatus -poolID [Pool_ID_Number]The output looks like this:
Auto-Tiering State: Enabled Relocation Rate: Medium Schedule Name: Default Schedule Schedule State: Enabled Default Schedule: Yes Schedule Days: Sun Mon Tue Wed Thu Fri Sat Schedule Start Time: 20:00 Schedule Stop Time: 6:00 Schedule Duration: 10 hours Storage Pools: Array1_Pool1_SPB, Array1_Pool0_SPA Storage Pool Name: Array1_Pool0_SPA Storage Pool ID: 0 Relocation Start Time: 08/15/13 20:00 Relocation Stop Time: 08/16/13 6:00 Relocation Status: Inactive Relocation Type: Scheduled Relocation Rate: Medium Data to Move Up (GBs): 8.00 Data to Move Down (GBs): 8.00 Data Movement Completed (GBs): 2171.00 Estimated Time to Complete: 4 minutes Schedule Duration Remaining: None Storage Pool Name: Array1_Pool1_SPB Storage Pool ID: 1 Relocation Start Time: 08/15/13 20:00 Relocation Stop Time: 08/16/13 6:00 Relocation Status: Inactive Relocation Type: Scheduled Relocation Rate: Medium Data to Move Up (GBs): 14.00 Data to Move Down (GBs): 14.00 Data Movement Completed (GBs): 1797.00 Estimated Time to Complete: 5 minutes Schedule Duration Remaining: NoneThe output of the command is very verbose, I want to trim it down to only show me the pool name and the estimated time for the relocation job to complete. This bash script will trim it down to only show the pool names and estimated completion times.
The final output of the script generated report looks like this:
Runtime: Thu Aug 11 07:00:01 CDT 2013 Array1_Pool0: 9 minutes Array1_Pool1: 6 minutes Array2_Pool0: 1 hour, 47 minutes Array2_Pool1: 3 minutes Array2_Pool2: 2 days, 7 hours, 25 minutes Array2_Pool3: 1 day, 9 hours, 58 minutes Array3_Pool0: 1 minute Array4_Pool0: N/A Array4_Pool1: 2 minutes Array5_Pool1: 5 minutes Array5_Pool0: 5 minutes Array6_Pool0: N/A Array6_Pool1: N/A
Below is the bash script that generates the report. The script is set up to report on six different arrays, it can be easily modified to suit your environment.
TODAY=$(date) echo “Runtime: $TODAY” > /reports/tierstatus.txt echo $TODAY # naviseccli -h [array_hostname1] autotiering -info -state -rate -schedule -opStatus -poolID 0 > /reports/[array_hostname1]_tierstatus0.out naviseccli -h [array_hostname1] autotiering -info -state -rate -schedule -opStatus -poolID 1 > /reports/[array_hostname1]_tierstatus1.out # echo `grep “Pool Name:” /reports/[array_hostname1]_tierstatus0.out |awk ‘{print $4}’`”: “`grep Complete: /reports/[array_hostname1]_tierstatus0.out |awk ‘{print $5,$6,$7,$8,$9,$10}’` >> /reports/tierstatus.txt echo `grep “Pool Name:” /reports/[array_hostname1]_tierstatus1.out |awk ‘{print $4}’`”: “`grep Complete: /reports/[array_hostname1]_tierstatus1.out |awk ‘{print $5,$6,$7,$8,$9,$10}’` >> /reports/tierstatus.txt # naviseccli -h [array_hostname2] autotiering -info -state -rate -schedule -opStatus -poolID 0 > /reports/[array_hostname2]_tierstatus0.out naviseccli -h [array_hostname2] autotiering -info -state -rate -schedule -opStatus -poolID 1 > /reports/[array_hostname2]_tierstatus1.out naviseccli -h [array_hostname2] autotiering -info -state -rate -schedule -opStatus -poolID 2 > /reports/[array_hostname2]_tierstatus2.out naviseccli -h [array_hostname2] autotiering -info -state -rate -schedule -opStatus -poolID 3 > /reports/[array_hostname2]_tierstatus3.out # echo `grep “Pool Name:” /reports/[array_hostname2]_tierstatus0.out |awk ‘{print $4}’`”: “`grep Complete: /reports/[array_hostname2]_tierstatus0.out |awk ‘{print $5,$6,$7,$8,$9,$10}’` >> /reports/tierstatus.txt echo `grep “Pool Name:” /reports/[array_hostname2]_tierstatus1.out |awk ‘{print $4}’`”: “`grep Complete: /reports/[array_hostname2]_tierstatus1.out |awk ‘{print $5,$6,$7,$8,$9,$10}’` >> /reports/tierstatus.txt echo `grep “Pool Name:” /reports/[array_hostname2]_tierstatus2.out |awk ‘{print $4}’`”: “`grep Complete: /reports/[array_hostname2]_tierstatus2.out |awk ‘{print $5,$6,$7,$8,$9,$10}’` >> /reports/tierstatus.txt echo `grep “Pool Name:” /reports/[array_hostname2]_tierstatus3.out |awk ‘{print $4}’`”: “`grep Complete: /reports/[array_hostname2]_tierstatus3.out |awk ‘{print $5,$6,$7,$8,$9,$10}’` >> /reports/tierstatus.txt # naviseccli -h [array_hostname3] autotiering -info -state -rate -schedule -opStatus -poolID 0 > /reports/[array_hostname3]_tierstatus0.out # echo `grep “Pool Name:” /reports/[array_hostname3]_tierstatus0.out |awk ‘{print $4}’`”: “`grep Complete: /reports/[array_hostname3]_tierstatus0.out |awk ‘{print $5,$6,$7,$8,$9,$10}’` >> /reports/tierstatus.txt # naviseccli -h [array_hostname4] autotiering -info -state -rate -schedule -opStatus -poolID 0 > /reports/[array_hostname4]_tierstatus0.out naviseccli -h [array_hostname4] autotiering -info -state -rate -schedule -opStatus -poolID 1 > /reports/[array_hostname4]_tierstatus1.out # echo `grep “Pool Name:” /reports/[array_hostname4]_tierstatus0.out |awk ‘{print $4}’`”: “`grep Complete: /reports/[array_hostname4]_tierstatus0.out |awk ‘{print $5,$6,$7,$8,$9,$10}’` >> /reports/tierstatus.txt echo `grep “Pool Name:” /reports/[array_hostname4]_tierstatus1.out |awk ‘{print $4}’`”: “`grep Complete: /reports/[array_hostname4]_tierstatus1.out |awk ‘{print $5,$6,$7,$8,$9,$10}’` >> /reports/tierstatus.txt # naviseccli -h [array_hostname5] autotiering -info -state -rate -schedule -opStatus -poolID 0 > /reports/[array_hostname5]_tierstatus0.out naviseccli -h [array_hostname5] autotiering -info -state -rate -schedule -opStatus -poolID 1 > /reports/[array_hostname5]_tierstatus1.out # echo `grep “Pool Name:” /reports/[array_hostname5]_tierstatus0.out |awk ‘{print $4}’`”: “`grep Complete: /reports/[array_hostname5]_tierstatus0.out |awk ‘{print $5,$6,$7,$8,$9,$10}’` >> /reports/tierstatus.txt echo `grep “Pool Name:” /reports/[array_hostname5]_tierstatus1.out |awk ‘{print $4}’`”: “`grep Complete: /reports/[array_hostname5]_tierstatus1.out |awk ‘{print $5,$6,$7,$8,$9,$10}’` >> /reports/tierstatus.txt # naviseccli -h [array_hostname6] autotiering -info -state -rate -schedule -opStatus -poolID 0 > /reports/[array_hostname6]_tierstatus0.out naviseccli -h [array_hostname6] autotiering -info -state -rate -schedule -opStatus -poolID 1 > /reports/[array_hostname6]_tierstatus1.out # echo `grep “Pool Name:” /reports/[array_hostname6]_tierstatus0.out |awk ‘{print $4}’`”: “`grep Complete: /reports/[array_hostname6]_tierstatus0.out |awk ‘{print $5,$6,$7,$8,$9,$10}’` >> /reports/tierstatus.txt echo `grep “Pool Name:” /reports/[array_hostname6]_tierstatus1.out |awk ‘{print $4}’`”: “`grep Complete: /reports/[array_hostname6]_tierstatus1.out |awk ‘{print $5,$6,$7,$8,$9,$10}’` >> /reports/tierstatus.txt # #Copy the current report to a new file and rename it, one prior day is saved. cp /cygdrive/c/inetpub/wwwroot/tierstatus.txt /cygdrive/c/inetpub/wwwroot/tierstatus_yesterday.txt #Remove the current report on the web page. rm /cygdrive/c/inetpub/wwwroot/tierstatus.txt #Copy the new report to the web page. cp /reports/tierstatus.txt /cygdrive/c/inetpub/wwwroot