Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All, I will be greatful, if anyone could get my a powershell script for a report in the below format. (Aggregate Name) (Total Space (TB)) (Used Capacity (TB))(Allocated Capacity (TB)) (Space Available (TB)) Thanks, Kalyan Guturi.
7 REPLIES 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no need of a powershell script, single cmdlet would give you that info.
Get-NaAggr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Vinith,
Thanks for the quick response. However, "Get-NaAggr" provides <total size> <used> and <Available> but doesn't provide allocated. Command "aggr show_space" provides all the mentioned information. How can we point this Get-NaAggr command to a specific filer.
Help here please....!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Connect to the Controller first as below.
Connect-NaController <Controller IP Address> -Credential (Get-Credential)
Then try out Get-NaAggr
I guess you are a newbie to powershell toolkit, check out some of these documents.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are correct by the way get-NaAgg doesn't contain the allocated amount... Did you ever find a Powershell command that would give the allocated amount? I am having the same issue where I am not able to find the allocated amount even on the cDOT systems using get-NcAgg. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Something like this should produce the information you're looking for:
Get-NcAggr | ForEach-Object { $x = "" | Select Name,Total_TB,Used_TB,Allocated_TB,Available_TB $x.Name = $_.Name $x.Total_TB = [Math]::Round($_.TotalSize / 1TB, 2) $x.Available_TB = [Math]::Round($_.Available / 1TB, 2) $x.Used_TB = [Math]::Round($_.AggrSpaceAttributes.SizeUsed / 1TB, 2) $x.Allocated_TB = 0 Get-NcVol | ?{ $_.Aggregate -eq $x.Name } | %{ $x.Allocated_TB += $_.TotalSize } $x.Allocated_TB = [Math]::Round($x.Allocated_TB / 1TB, 2) $x }
There is no single command or attribute which shows the allocated capacity against an aggregate. Instead you simply find all the volumes on that aggregate and sum their provisioned space.
Hope that helps.
Andrew
If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can we add %overcommited in this ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Kirand1979,
You can add in the commitment percent using this line:
$x.Committed_Percent = [Math]::Round(($x.Allocated_TB / $x.Total_TB) * 100)
Don't forget to add the "Committed_Percent" field to the object declaration too.
$x = "" | Select Name,Total_TB,Used_TB,Allocated_TB,Available_TB,Committed_Percent
Hope that helps.
Andrew
If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
