Microsoft Virtualization Discussions

Volume information in Diag mode

VolkerJ
3,840 Views

Hi.

I need only the field "Auto State" for all Volumes. Auto State is only showing in diag mode with the parameter -l

 

volume efficiency status -vserver EU51SVMP016 -volume <volume-name> -l

output: 

...

Auto State: Deprioritized

...

What is the Attribute for auto state?

 

Thank you for your support in advanced.

Best,

Volker

 

 

 

 

3 REPLIES 3

donny_lang
3,798 Views

I wasn't able to find a way to do this with the CLI natively, but if you don't mind PowerShell, it should be fairly easy to get the output you want.

 

# Open connection to NetApp controller
Connect-NcController <controller hostname>
# Run SSH command and store output as variable named $autostate
$autostate = Invoke-NcSsh -Command "set d; y; vol efficiency status -vserver EU51SVMP016 -volume * -l"
# Output is a multi-line string stored as one large string, so we'll split it into multiple strings delimited by a new line
$autostate = $autostate -split "`n"
# Now we can select the strings we want for the output. I've selected the "Path" and "Auto State" strings
$autostate | Select-String -Pattern "Auto State","Path"

Output looks like this:

 

Path: /vol/path1
Auto State: -
Path: /vol/path2
Auto State: -
Path: /vol/path3
Auto State: -
Path: /vol/path4
Auto State: -
Path: /vol/path5
Auto State:

 

Not pretty, but it works!

cole
3,788 Views

This seems to work in 9.6:

volume efficiency status -fields auto-state

donny_lang
3,782 Views

Oh yeah, I should have clarified that I wasn't able to find the command in the CLI natively on my systems running 9.3. That command might exist in 9.4 or 9.5 too if you're running that and would be WAY easier than my little script.  Smiley Happy

Public