Is it possible to output the pcap summary (using -z in tshark) in a specific format like csv/xml asked 05 Dec '14, 13:44 nightwatcher |
One Answer:
Not within tshark -z io,stat (though I wish it could). It's doable with a script though. The -z io,stat output will put all the capture file's statistics you're looking for into a single very long line and a "|" delimiter. There are a couple tricks to it though:
I really do wish -z would just give a .csv output, though. People who forego the GUI to write out a longhand -z query are likely not the sort who would want pretty ASCII text output. Likely, they're using tshark because they want to automate it and the output makes it inherently more difficult for it to be used for that purpose. Edit: For reference, at least for the -z io,stat to be an option here I've submitted bug/feature request 10759. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10759 answered 05 Dec '14, 15:12 Quadratic edited 05 Dec '14, 15:36 |
I just wanted the summary for rtp streams and sip stats to be put in variables but now I see that there is no other way other than doing regex and other non elegant file parsing to achieve the purpose.