Ask Your Question
0

time limit for tshark capturing

asked 2018-08-01 15:39:23 +0000

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I am using tshark to capture my network traffic and I want to limit the measurement time.

Tshark runs in a bash script to automatise the measurement, just like this:

tshark -i 1 -w test.pcap

Now I want to stop the measurement after X seconds.

How can I do that?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-08-01 16:11:55 +0000

grahamb gravatar image

Use the -a autostop parameter, e.g.

tshark -i 1 -w test.pcap -a duration:60

To stop after 60 seconds. See the manpage (or the -h output) for tshark for more info.

edit flag offensive delete link more

Comments

Thanks, that's exactly what I wanted to do!

jjulianf gravatar imagejjulianf ( 2018-08-02 07:46:39 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-08-01 15:39:23 +0000

Seen: 4,435 times

Last updated: Aug 01 '18