Hello all, I am running CentOS v5.8 64bit. What is the correct display filter options to use in TShark if I want to redirect the output as CSV from reading a PCAP file? The columns will have the following output separated by commas:
Where:
My current tshark syntax is:
As you can see, I still don't know what are the other display filters to use in order to achieve my requirement. I hope anyone from this community can help me. Below is the screenshot from WireShark in customizing the display filter columns to which I would like to achieve in a single tshark command. Lastly, is there a way to get the statistics of the total upload bandwidth and the total download bandwidth by source IP address group by destination IP address, destination port or transport layer protocol as part of the TShark option? Thank you in advance. asked 26 Aug '12, 19:37 bintut edited 29 Aug '12, 02:55 |
One Answer:
To find a answered 27 Aug '12, 00:42 grahamb ♦ edited 29 Aug '12, 03:26 But in WireShark, you can specify the column names when you go to the "Edit > Preferences > User Interface > Columns" as generic as shown in my screenshot above specially on the source port and destination port regardless of transport layer protocol. So, how am I able to execute a single tshark command from the CLI in order to achieve the CSV format that I want? (29 Aug '12, 02:56) bintut When I mentioned "filter name" in my answer I really meant field name. In the editor for the columns there is a field "Field name:", in your example "frame.time_epoch". This is the value you use in the tshark command line with the -e command, e.g. -e frame.time_epoch. (29 Aug '12, 03:22) grahamb ♦ I cannot get the source port and destination port in just one tshark command regardless of the transport layer protocol. In WireShark having the configuration I mentioned above, it can display the source port number and destination port number regardless if it's TCP, UDP, SCTP, etc. What I know for now in tshark is the "-e tcp.srcport" or "-e udp.srcport" but not without having only like "-e srcport". (29 Aug '12, 03:41) bintut |
I found the preferences file from my WireShark in my MS Windows 7 desktop and tried to execute the command in my CentOS v5.8 machine and I got an error:
Now, the below command partially works for what I need:
Now, how can I change the spaces/tabs into a comma? If I try to add the options:
I am getting an error message: