This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

How do i save logs with selected attributes only?

0

I need to get only the time, size and the number of the packets from the generated logs in the text file and then I can then upload the text file into my software. Can anyone please help me with that?

asked 03 Jun '12, 07:28

manish's gravatar image

manish
1111
accept rate: 0%

edited 04 Jun '12, 06:54

multipleinterfaces's gravatar image

multipleinte...
1.3k152340


One Answer:

0

Presuming you have the capture files, you can use tshark to output the fields you require. The trick is knowing the names of the fields, I usually open the capture in Wireshark, select the fields in the packet tree and the field name will be displayed in the status bar at the bottom.

In your case you are asking for the time and size, presumably of each packet, and the number, do you mean frame number?

The command line to produce the time, size and number of each packet is:

tshark -r yourcapturefile -T fields -e frame.time -e frame.len -e frame.number

Read the tshark man page for more info on the -T and -e parameters.

answered 03 Jun '12, 09:17

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%