ONTAP Discussions

Changing Command Line Display From KB to GB

TMADOCTHOMAS
4,403 Views

I'm pretty sure I saw this years ago but I've forgotten the command. How do you change the display results of a command so data is listed in GB or TB instead of KB? (The specific command I'm interested in at the moment is volume efficiency stat).

1 ACCEPTED SOLUTION
9 REPLIES 9

SpindleNinja
4,394 Views

TMADOCTHOMAS
4,376 Views

Thank you @SpindleNinja ! I knew this was an easy one, just wasn't looking in the right place. 

TMADOCTHOMAS
4,372 Views

Well ... this is the right answer, but I technically spoke too soon. The command doesn't affect the output of the specific command I'm using, volume efficiency stat.

SpindleNinja
4,354 Views

huh.. that is weird.   I tested a 9.12.1 sim - 

 

cluster1::*> vol eff stat
Vserver     Volume              Allocated          Saving             %Saved
----------- ------------------- ------------------ ------------------ ------
svm1_cluster1 TESTVOL                       292 KB               0 KB     0%

cluster1::*> vol eff stat -b
Vserver     Volume              Allocated          Saving             %Saved
----------- ------------------- ------------------ ------------------ ------
svm1_cluster1 TESTVOL                    73 blocks           0 blocks     0%


cluster1::*> vol eff stat -fields space-saved
vserver       volume  space-saved
------------- ------- -----------
svm1_cluster1 TESTVOL 0 KB

cluster1::*> set -unit GB

cluster1::*> vol eff stat -fields space-saved
vserver       volume  space-saved
------------- ------- -----------
svm1_cluster1 TESTVOL 0 KB

cluster1::*> vol show
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
cluster1-01 vol0       aggr0_cluster1_01 online RW        22GB       12GB   44%
cluster1-02 vol0       aggr0_cluster1_02 online RW        22GB       10GB   50%
svm1_cluster1 TESTVOL  cluster1_01_SSD_1 online RW        10GB        9GB    0%
svm1_cluster1 svm1_cluster1_root cluster1_02_SSD_1 online RW 0GB      0GB    6%
svm2_cluster1 svm2_cluster1_root cluster1_01_SSD_1 online RW 0GB      0GB    5%
5 entries were displayed.

cluster1::*> vol eff stat -fields Total-
    total-space-saved    total-processed-data total-process-time
    total-verify-time
cluster1::*> vol eff stat -fields Total-space-saved
vserver       volume  total-space-saved
------------- ------- -----------------
svm1_cluster1 TESTVOL 0 KB

cluster1::*> set -unit PB

cluster1::*> vol show
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
cluster1-01 vol0       aggr0_cluster1_01 online RW         0PB        0PB   44%
cluster1-02 vol0       aggr0_cluster1_02 online RW         0PB        0PB   50%
svm1_cluster1 TESTVOL  cluster1_01_SSD_1 online RW         0PB        0PB    0%
svm1_cluster1 svm1_cluster1_root cluster1_02_SSD_1 online RW 0PB      0PB    6%
svm2_cluster1 svm2_cluster1_root cluster1_01_SSD_1 online RW 0PB      0PB    5%
5 entries were displayed.

cluster1::*> vol eff stat -fields Total-space-saved
vserver       volume  total-space-saved
------------- ------- -----------------
svm1_cluster1 TESTVOL 0 KB

cluster1::*>

 

does work for other vol eff commands though - 

cluster1::*> vol efficiency show -volume TESTVOL -fields Logical-data-size
vserver       volume  logical-data-size
------------- ------- -----------------
svm1_cluster1 TESTVOL 0PB

 

 

vol show shows savings - 

 

cluster1::> vol show -fields dedupe-space-saved,dedupe-space-saved-percent,compression-space-saved,compression-space-saved-percent
vserver     volume dedupe-space-saved dedupe-space-saved-percent compression-space-saved compression-space-saved-percent
----------- ------ ------------------ -------------------------- ----------------------- -------------------------------
cluster1-01 vol0   0PB                0%                         0PB                     0%
cluster1-02 vol0   0PB                0%                         0PB                     0%
svm1_cluster1 TESTVOL 0PB             0%                         0PB                     0%
svm1_cluster1 svm1_cluster1_root 0PB  0%                         0PB                     0%
svm2_cluster1 svm2_cluster1_root 0PB  0%                         0PB                     0%
5 entries were displayed.

cluster1::>

 

Let me ask some folks if there's a reason why. 

 

but what are you trying to see though? just volume space savings? 

John_Kolacz
4,259 Views

Set -units KB,GB,MB


John Kolacz
Lead Systems Architect

TMADOCTHOMAS
4,249 Views

@SpindleNinja , thanks for checking. Some of the commands you showed give me essentially what I'm looking for. I've been looking for a couple of years for a way to get the exact details we used to get in the System Manager GUI, which I always found helpful. It's been extremely frustrating to not have that since 9.8. I think I've finally hit on a combination of the following giving most of the details we used to see. Thanks for the help.

volume efficiency show -volume <volume> -fields last-op-state,last-op-begin,last-op-end,last-op-size
volume show -volume <volume> -fields size,sis-space-saved,sis-space-saved-percent

TMADOCTHOMAS
4,249 Views

@John_Kolacz thanks for the tip! See my note to SpindleNinja about this not working with one command, but it does seem to work with the others.

John_Kolacz
4,243 Views

I didn't see the other reply, but in answer to your question as to why it doesn't work with vol eff stat, my first thought is that the devs who write the commands didn't update that one and in the code it is hard coded to units.  I would hazard a guess that the preferred command is volume efficiency show -fields, while volume efficiency statistics is an older command that still works but wasn't updated by the devs.   It personally drives me crazy that command syntax varies depending on which group of devs wrote the command.

TMADOCTHOMAS
4,239 Views

Yeah that makes sense @John_Kolacz , you're probably right. Agreed about the inconsistency, it creates some confusion such as in this discussion. Even moreso, I really wish they would fix the GUI and make it as good as it used to be pre-9.7 but the changes so far have been just trickling in with each version. We are on 9.11.1 at the moment and it is slightly improved but still missing key features. I actually like the look/feel and the new features which are useful, but man they stripped out some of the most critical functionality.

Public