Currently Being Moderated

Exporting Get-NaEfficiency output to an Excel workbook

The Get-NaEfficiency cmdlet introduced in DataONTAP PowerShell Toolkit 1.5 provides an easy mechanism for gathering efficiency information.  Attached to this post is a script, Export-NaEfficiencyXls.ps1, that exports the data gathered by the Get-NaEfficiency cmdlet to an Excel workbook, complete with a handful of graphical representations of the data.

 

Usage:

.\Export-NaEfficiencyXls [-Filename <String>] [-Unit <Int>] [-Controller <NaController>] [-Quiet]

 

The filename parameter (optional) is the name to give the exported workbook.  If no name is provided, the workbook is saved as "ControllerName_na_efficiency_TimeStamp.xlsx".

The Unit parameter (optional) defines the units to use when displaying values in bytes.  Options: 1KB, 1MB, 1GB, 1TB, 1PB.  The default value is 1MB.

The Controller parameter (optional) allows you to specify which NaController object to run Get-NaEfficiency against.  The default value is the value saved in $global:CurrentNaController.

The Quiet switch allows you to prevent the launching of Excel at the script's completion.

 

The script creates four graphs in the "Charts" worksheet of the exported workbook.  The first chart is the "Aggregate Space" chart:

 

aggr_space.png

This chart provides a quick overview of how full your aggregates are.

 

The second chart included is the "Aggregate Snapshot Returns" chart:

aggr_snapshot_returns.png

This chart shows the snapshot returns of all the aggregates on the controller.  The snapshot returns value is estimated using the follow calculation:  Used Space - (Snapshot Used Space / # Of Snapshots).  We divide the snapshot used space by the number of snapshots to get an accurate savings calculation from aggregates with long-running snapshots that effectively consume more space than the space consumed by the data.

 

The third chart is the "Volume Efficiency" chart:

vol_efficiency.png

This chart shows the used percentage and the efficiency percentage of each volume contained on the controller.  The efficiency percentage is calculated by adding the efficiency returns from snapshots, deduplication, volume compression, and FlexClone Volumes to the used space and dividing by the capacity.

 

The final chart is the "Volume Efficiency Breakdown" chart:

vol_efficiency_breakdown.png

This chart provides a visualization of the efficiency returns.  The used space is stacked with the returns from deduplication, snapshots, volume compression, and FlexClone Volumes so the Effective Used value of each volume is shown.

 

Feel free to modify the script to fit your needs, just be sure to share any cool changes with the community

 

EDIT 7/29/2011:  Posting updated script, special thanks to Glenn Sizemore for cleaning it up!

Comments

Delete Document

Are you sure you want to delete this document?