Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-07-2012, 03:03 PM   #1
Registered: Mar 2007
Posts: 47

Rep: Reputation: 0
TCPDUMP help -- option question


I have a question regarding TCPDUMP. I'm looking to run a TCPDUMP command with either of the following options:

- I want to capture x number of packets (somewhere between 1 to 10 packets)


- I want to capture for x number of seconds (I will want to capture for 1 second or less). Is it possible to capture for a time period of less than whole numbers (i.e. 0.5 seconds or 0.3 seconds, etc)?

Thanks in advance!
Old 02-07-2012, 03:20 PM   #2
Senior Member
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 210Reputation: 210Reputation: 210
You can always do something like this -- start a background process that sleeps for the desired time, then kill the dump.

tcpdump -A -i wlan0 &
pid=$?; sleep 3.25 && kill -9 $pid &


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
tcpdump question skoinga Linux - Networking 5 10-28-2010 02:32 PM
tcpdump -x option shows hex as well as ascii rooky Programming 2 11-25-2009 08:16 AM
tcpdump version 4.0.0 decode Agent-Information Option 82 robel Linux - Software 1 03-28-2009 12:40 PM
Tcpdump question? chinmays Linux - Software 9 01-08-2006 09:56 PM
tcpdump -n question Melissa22 Linux - Networking 3 03-07-2004 09:05 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:44 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration