I want to write a script where I need to verify the final result (pass/fail) based on a graph generated in wireshark.
Attaching reference screenshot :- To write pcap before sending messages sudo /usr/sbin/tethereal -i eth2 -q -w Wm_FUN_010.pcap -R diameter To read pcap after message exchange is done sudo /usr/sbin/tethereal -r Wm_FUN_010.pcap -R "diameter.Auth-Request-Type == 2 && diameter.cmd.code == 265 && diameter.flags.request == 1" As of now, I know only Graph option to verify the rate, but I am looking for an automated script solution. Is there a way I can do this with Graph or any other method? I searched for reference but couldn't get any information on this. It will be really helpful if someone can suggest a method or reference to achieve above requirement. I tried following command which gives count based on time interval, but what I need is, count for a particular protocol message which is 6 for my case.
With “tshark io” related command, getting count might be possible, but couldn’t get enough information on this. Can someone throw some light on how to achieve this? asked 06 Oct ‘13, 10:49 npatel edited 15 Sep ‘14, 22:38 Guy Harris ♦♦ |
2 Answers:
You can use tshark's -z io,stat option. That command can take display filters as well to generate those types of stats as output which you can then return to the scripted process you're referring to. Depending on the setup, another way is to use the 'tshark -T fields -e (display filter) -e (display filter)' command to print out columns that you want and pipe them into awk scripts (for example) to generate all the stats you want from them that way. diameter.resp_time would be one example value that you can make use of to calculate min/max/average Diameter response times. answered 06 Oct '13, 21:56 Quadratic |
Another option with tshark would be:
or even
Hint: You might need a more recent version of tshark than the tethereal you are currently using ;-) Take the output of that command and feed it into a spreadsheet or a script and do the analysis yourself. You'll get the time, the frame number (if needed) and the IP addresses (to distinguish different conversations). With that information you can easily calculate the 'message rate'. Regards answered 07 Oct '13, 07:57 Kurt Knochner ♦ edited 09 Oct '13, 01:54
Did you try my tshark command? (09 Oct '13, 01:53) Kurt Knochner ♦ |
@Quadratic, Thanks for your response. Will check and get back if there is any issue.