Skip to main content

Methods of customizing show command output by using fields

Contributors netapp-barbe

When you use the –instance parameter with a show command to display details, the output can be lengthy and include more information than you need. The –fields parameter of a show command enables you to display only the information you specify.

For example, running volume show -instance is likely to result in several screens of information. You can use volume show –fields fieldname[,fieldname…​] to customize the output so that it includes only the specified field or fields (in addition to the default fields that are always displayed.) You can use –fields ? to display valid fields for a show command.

The following example shows the output difference between the –instance parameter and the –fields parameter:

cluster1::> volume show -instance

                                   Vserver Name: cluster1-1
                                    Volume Name: vol0
                                 Aggregate Name: aggr0
                                    Volume Size: 348.3GB
                             Volume Data Set ID: -
                      Volume Master Data Set ID: -
                                   Volume State: online
                                    Volume Type: RW
                                   Volume Style: flex
                                         ...
                          Space Guarantee Style: volume
                      Space Guarantee in Effect: true
                                         ...
Press <space> to page down, <return> for next line, or 'q' to quit...
...
cluster1::>

cluster1::> volume show -fields space-guarantee,space-guarantee-enabled

vserver  volume space-guarantee space-guarantee-enabled
-------- ------ --------------- -----------------------
cluster1-1 vol0   volume          true
cluster1-2 vol0   volume          true
vs1      root_vol
                  volume          true
vs2      new_vol
                  volume          true
vs2      root_vol
                  volume          true
...
cluster1::>