Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 10-18-2010, 03:59 PM   #1
LQ Newbie
Registered: Jan 2008
Distribution: Centos5/RHEL5
Posts: 20

Rep: Reputation: 0
tcpdump -w not writing data


I'm trying to capture packets to a file with the -w option but the file is empty yet if I use the '-w -' option to put data on stdout I see plenty of captured packets.

I'm using CentOS 5.5 x86

[root@server ~]# tcpdump -v -i eth0 -w dump -s0
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
718 packets captured
718 packets received by filter
0 packets dropped by kernel
[root@server ~]# file dump
dump: empty
Any ideas why the file is empty?

Old 10-18-2010, 04:16 PM   #2
Senior Member
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 164Reputation: 164
Is the drive full and do you have write permissions to the directory (check chattr for special perms also)? Also see if it writes them to screen if you use a -w -
Old 10-18-2010, 04:35 PM   #3
LQ Newbie
Registered: Jan 2008
Distribution: Centos5/RHEL5
Posts: 20

Original Poster
Rep: Reputation: 0
I can create files in root's home directory without a problem, plenty of space on the slice. And yes, as I said if I do -w - I see plenty of data scrolling up the screen.

The network card is a VMware vmxnet adapter on a VM so I was wondering if the vswitch was blocking promiscuous mode but even -p gives the same problem so I may be confusing the issue.

Last edited by greyarea; 10-18-2010 at 04:36 PM. Reason: typo


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
[SOLVED] Writing binary data under python. dracuss Programming 12 04-14-2009 08:57 AM
Incorrect source/destination ports when reading tcpdump data with libpcap Nylex Programming 2 06-21-2007 04:10 AM
3Com fiber n/w card - only start to recieves data when tcpdump runs sceadu Linux - Networking 1 07-27-2005 08:00 AM
tethereal and tcpdump: -y invalid data link type 1 murugesan Linux - Wireless Networking 0 05-30-2004 11:28 PM
CD RW -- Writing Data to CD dnachtwey Linux - Hardware 39 01-25-2004 06:22 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:56 PM.

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