Microsoft Virtualization Discussions

NetApp Powershell Toolkit Discrepancy Between PowerShell Window and CSV Export

terryzolinski
4,311 Views

Good day all, I'm simply using get-ncaggr | export-csv path  to output my aggregate space. But, I've also noticed this discrepancy using get-ncvol | export-csv.

 

Problem, the console window output for my one of my root aggregates (as an example) shows TotalSize as 753.2 GB. When using export-csv, the value for TotalSize is 808747343872, which is the same output value as the AggregateSize when using Get-NcAggrSpace -Name aggr. So, it seems that TotalSize in the console window is different than TotalSize in the csv output, a completely different value, or they forget to carry the 1...???

 

Does anyone know the formula being used to translate "AggregateSize" to "TotalSize"? What value is AggregateSize provided in? According to my math, it's somwhere in the realm of /1074000000 to get close to the number provided in the console window, this doesn't sound right to me.

 

Thanks in advance!

1 ACCEPTED SOLUTION

asulliva
4,299 Views

Hello!

 

The number in the CSV is in bytes, so you would divide by 1024 three times...e.g. "XXX / 1024 / 1024 / 1024", or 1073741824 (the number of bytes in a GiB)...to convert the value to GiB.  The PowerShell Toolkit does this for you when it displays back the values to make them readable.  Using the PowerShell Toolkit you can convert the value to a more friendly number using the "ConvertTo-FormattedNumber" cmdlet.

 

Hope that helps.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

2 REPLIES 2

asulliva
4,300 Views

Hello!

 

The number in the CSV is in bytes, so you would divide by 1024 three times...e.g. "XXX / 1024 / 1024 / 1024", or 1073741824 (the number of bytes in a GiB)...to convert the value to GiB.  The PowerShell Toolkit does this for you when it displays back the values to make them readable.  Using the PowerShell Toolkit you can convert the value to a more friendly number using the "ConvertTo-FormattedNumber" cmdlet.

 

Hope that helps.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

terryzolinski
4,267 Views

I feel dumb at this point, thanks for fixing my life!!!

Public