NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

ONTAP Discussions

Units for "snapshot show -fields size"

SMLocke
9,550 Views

I've got a fair number of volumes with daily and weekly snapshots (i.e., snapshots whose names start with daily.2016-02* or weekly.2016-02*), and my management is getting curious about how much space the snapshots are taking up in a given SVM. It feels like a command as simple as snapshot show -vserver foobar -fields size -snapshot weekly.* will do the trick, and it mostly is? Except that snapshots less than 1GB are shown in megabytes, and I'd love it a great deal if the CLI would show me all the numbers in GB, even if it's less than 1 (i.e., 0.43GB or what have you). Is that a thing I can do? Or is there some other kind of voodoo I'd need to do with OCUM (5.2, if that's relevant)?

 

Thanks!

1 ACCEPTED SOLUTION

asulliva
9,529 Views

Use the "set" command.  Here are the options for units:

 

    [-units {auto|raw|B|KB|MB|GB|TB|PB}] - Data Units
         Use this parameter to specify the default units used when reporting data sizes. Possible values are:

         o   auto - Auto-scale data size for human-readable output

         o   raw - Bytes without unit designation

         o   B - Bytes

         o   KB - Kilobytes

         o   MB - Megabytes

         o   GB - Gigabytes

         o   TB - Terabytes

         o   PB - Petabytes

         The default setting is auto.

For example, to always display in MB you would use "set -units MB" from the clustershell.

 

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
9,530 Views

Use the "set" command.  Here are the options for units:

 

    [-units {auto|raw|B|KB|MB|GB|TB|PB}] - Data Units
         Use this parameter to specify the default units used when reporting data sizes. Possible values are:

         o   auto - Auto-scale data size for human-readable output

         o   raw - Bytes without unit designation

         o   B - Bytes

         o   KB - Kilobytes

         o   MB - Megabytes

         o   GB - Gigabytes

         o   TB - Terabytes

         o   PB - Petabytes

         The default setting is auto.

For example, to always display in MB you would use "set -units MB" from the clustershell.

 

Hope that helps.

 

Andrew

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

SMLocke
9,511 Views

This did the trick!

 

Caveat: setting units to GB will show all values less than 1GB as 0GB, not as a decimal value between 0 and 1 GB. Therefore setting units to MB (in my use case) makes more sense. 

 

Thanks!

Public