If there was a feature request, mandatory 'don't reformat output' options on all the commands would be one.
Having hit similar problems, I've ended up in several cases making an API call to fetch structured output. Mostly because with the XML I get out of the API, there's no 'wrapping' or 'field merging' to disentangle.
Is this an option here? For 7 mode the API call is 'perf-object-get-instances' with an 'objectname' of 'volume'.
E.g.:
<!DOCTYPE netapp SYSTEM "file:/etc/netapp_filer.dtd"> <netapp version="1.7" xmlns="http://www.netapp.com/filer/admin"> <perf-object-get-instances> <objectname>volume</objectname> </perf-object-get-instances> </netapp>
If it's any use, I think I have some sample (perl) scripts for running this sort of fetch?
On 7 July 2015 at 00:56, Rue, Randy rrue@fredhutch.org wrote:
I'm trying to call the "statistics volume show" command and parse it for the latency numbers for each volume.
The CDOT command is trying to do some clever line wrapping so that lines with long fields break to the next line. I could just take the last field of each line but once in a while even that won't work, in some cases the bytes read is the last field of the line and the latency is the first (and last) field of the line following. Gah.
Doesn't appear to be any sort of "-csv" flag for the command, or any real formatting options at all. Even tried noodling with the terminal settings used by the SSH call , thinking the line wrap might have to do with that. Can't reliably make the output behave.
Anybody else faced this? Any guidance?
Randy in Seattle
Toasters mailing list Toasters@teaparty.net http://www.teaparty.net/mailman/listinfo/toasters