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

Display time in seconds without date using -T fields -e

0

When I use the command below: $ tshark -r fie.pcap -T fields -e frame.number -e frame.time -e ip.src -e ip.proto

I get the time with the date including. How can I display just the time (not the date) only in seconds (not hours or minutes). if I add -t a before -r, I still get the date displayed together with the time in hours, min and seconds. After sorting by IP source address, I am trying to determine the duration of those flows that have 100 packets or more for each IP source address. Thank you.

asked 25 Nov '16, 00:08

MaryR's gravatar image

MaryR
26558
accept rate: 0%

edited 25 Nov '16, 03:16

grahamb's gravatar image

grahamb ♦
19.8k330206


One Answer:

1

You're not looking for frame.time but what presented in the Time column (that's not the same).

$ tshark -r fie.pcap -T fields -e frame.number -t e -e _ws.col.Time -e ip.src -e ip.proto

answered 25 Nov '16, 02:47

Jaap's gravatar image

Jaap ♦
11.7k16101
accept rate: 14%

Thank you for your help Jaap. Just to clarify (for me):

I get a display with 4 columns/fileds: frame#, time (in secs), ip source, protocol, so "-t e _ws.col.Time" , all this expression displays the time in seconds, correct?

The last column I wanted to display whether UDP, TCP or ICMP traffic, so I don't think ip.proto was the right filter because I just get a column with the number "6". What would be the right filter for that purpose?

Thank you very much.

(25 Nov '16, 07:55) MaryR