ONTAP Discussions
ONTAP Discussions
Hello,
Is it possible to setup ONTAP CLI output without displaying headers ?
For example, instead of output for command vserver vscan connection-status show-connected -fields server:
node vserver server
--------- --------- ----------
Node01 svm_nas01 X.X.X.X
to get:
Node01 svm_nas01 X.X.X.X
Thanks,
Alex.
Solved! See The Solution
No way to do this, but you can make the output look nicer with the "-sort-by" option in diag priv.
For example, this is vol show with size/used filtered:
ontap9-tme-8040::*> vol show -vserver DEMO -volume dd_test* -fields size,used
vserver volume size used
------- ------- ---- -------
DEMO dd_test 10TB 134.0GB
DEMO dd_test__0001
1.25TB
17.77GB
DEMO dd_test__0002
1.25TB
14.72GB
DEMO dd_test__0003
1.25TB
16.76GB
DEMO dd_test__0004
1.25TB
13.71GB
DEMO dd_test__0005
1.25TB
17.78GB
DEMO dd_test__0006
1.25TB
20.80GB
DEMO dd_test__0007
1.25TB
14.73GB
DEMO dd_test__0008
1.25TB
17.76GB
9 entries were displayed.
This is how it looks when I use "-sort-by name":
ontap9-tme-8040::*> vol show -vserver DEMO -volume dd_test* -fields size,used -sort-by name
vserver volume size name-ordinal used
------- ------------- ------ ------------ -------
DEMO dd_test 10TB - 134.0GB
DEMO dd_test__0001 1.25TB base 17.77GB
DEMO dd_test__0002 1.25TB base 14.72GB
DEMO dd_test__0003 1.25TB base 16.76GB
DEMO dd_test__0004 1.25TB base 13.71GB
DEMO dd_test__0005 1.25TB base 17.78GB
DEMO dd_test__0006 1.25TB base 20.80GB
DEMO dd_test__0007 1.25TB base 14.73GB
DEMO dd_test__0008 1.25TB base 17.76GB
9 entries were displayed.
Much cleaner.
As near as I can tell there is no option to remove the headers after running a show command.
No way to do this, but you can make the output look nicer with the "-sort-by" option in diag priv.
For example, this is vol show with size/used filtered:
ontap9-tme-8040::*> vol show -vserver DEMO -volume dd_test* -fields size,used
vserver volume size used
------- ------- ---- -------
DEMO dd_test 10TB 134.0GB
DEMO dd_test__0001
1.25TB
17.77GB
DEMO dd_test__0002
1.25TB
14.72GB
DEMO dd_test__0003
1.25TB
16.76GB
DEMO dd_test__0004
1.25TB
13.71GB
DEMO dd_test__0005
1.25TB
17.78GB
DEMO dd_test__0006
1.25TB
20.80GB
DEMO dd_test__0007
1.25TB
14.73GB
DEMO dd_test__0008
1.25TB
17.76GB
9 entries were displayed.
This is how it looks when I use "-sort-by name":
ontap9-tme-8040::*> vol show -vserver DEMO -volume dd_test* -fields size,used -sort-by name
vserver volume size name-ordinal used
------- ------------- ------ ------------ -------
DEMO dd_test 10TB - 134.0GB
DEMO dd_test__0001 1.25TB base 17.77GB
DEMO dd_test__0002 1.25TB base 14.72GB
DEMO dd_test__0003 1.25TB base 16.76GB
DEMO dd_test__0004 1.25TB base 13.71GB
DEMO dd_test__0005 1.25TB base 17.78GB
DEMO dd_test__0006 1.25TB base 20.80GB
DEMO dd_test__0007 1.25TB base 14.73GB
DEMO dd_test__0008 1.25TB base 17.76GB
9 entries were displayed.
Much cleaner.
Thanks
--
Alex