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
maybe: set -showallfields true -showseparator ",";statistics volume show
(it worked for me, but I'm not sure if I have any volume names long enough to make it wrap)
m
-----Original Message----- From: toasters-bounces@teaparty.net [mailto:toasters-bounces@teaparty.net] On Behalf Of Rue, Randy Sent: Monday, July 6, 2015 6:57 PM To: 'toasters@teaparty.net' Subject: formatting output from 8.3 CLI statistics commands?
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
Thanks all for several good suggestions along the lines of setting the session arguments to change the output, I hadn't gone that way.
Note that it doesn't have to involve long names, if the SVM is under heavy load even the "bytes received" and so on can be long enough to wrap the line.
-----Original Message----- From: Weber, Mark A [mailto:mark-a-weber@uiowa.edu] Sent: Monday, July 06, 2015 7:51 PM To: Rue, Randy; 'toasters@teaparty.net' Subject: RE: formatting output from 8.3 CLI statistics commands?
maybe: set -showallfields true -showseparator ",";statistics volume show
(it worked for me, but I'm not sure if I have any volume names long enough to make it wrap)
m
-----Original Message----- From: toasters-bounces@teaparty.net [mailto:toasters-bounces@teaparty.net] On Behalf Of Rue, Randy Sent: Monday, July 6, 2015 6:57 PM To: 'toasters@teaparty.net' Subject: formatting output from 8.3 CLI statistics commands?
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
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