简体   繁体   中英

How to ease later parse on NetApp 7-Mode?

I would like to parse and extract useful information from several Netapp commands output such as sysconfig , uptime and so on.

I had already done it on Netapp Clustered Mode (C-Mode) because set command made my life much easier with this kind of sentences:

  • Custom delimiter character:

     set -showseparator '!'; 
  • Unlimited terminal lenght.

     set -rows 0; 
  • Show all fields

     set -showallfields true; 

However, set command does not exist in Netapp 7-Mode. ¿Does any one know something similar to modify the terminal length, units, field separator?

This is the version I have in hands:

3250-01> version
NetApp Release 8.1.2P4 7-Mode: Fri Apr 26 19:57:25 PDT 2013

There is no similar functionality in 7-mode. You have to parse the output. It's not too bad for some commands (like df or version ) but others have formatting, and it gets very messy (like aggr show_space and vol status )

The closest you get is to make API calls and parse resultant XML. That's a bit more complicated, but I've got some example code of how it might work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM