tcpdump -w: how to reduce disk space ?


 
Thread Tools Search this Thread
Special Forums IP Networking tcpdump -w: how to reduce disk space ?
# 1  
Old 07-02-2009
tcpdump -w: how to reduce disk space ?

Hello !

I am using
tcpdump -w /tr.cap -p -n -s 0 "udp"
to trace my network trafic.
(analysing later)

I want to reduce the size of the trace files.
Firtst i can use the great -C option but old files are not deleted...
Second I don't want trace RTP packet but i can't find how to use ("not rtp" , "udp.port < 10000"...)

Idealy i want trace only few firsts bytes of RTP but all bytes of other...

Any idea ?
Thanks
# 2  
Old 07-07-2009
A few ideas:

If you're happy with what you're doing except that you also want to delete old files, use a cron job or script that runs every 10 seconds (or whatever) and deletes any file (which must at least partially match the name you specify with the -w switch) exceeding the number of Bytes you entered for the -C parameter for tcpdump.

You can use the "dst portrange" qualifier to search for packets with destination ports not exceeding 9999 (i.e., tcpdump -i eth0 dst portrange 0-9999).

If you have some script that reads these files in and parses them for information then deletes them, you could save yourself the bother of writing a file, and instead use tcpdump's -l option to enable line buffering. This will let you pipe the output of tcpdump directly into a command(s) for parsing.

Good luck.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reduce the space every four hours

Hi Team, Please help me in shell script, I have a some file in Linux which I want to reduce the space every 4 hours in the form of ZIP move to other location with the help of Shell Script using with with current date. Can you please help me. Regards, Suhail (3 Replies)
Discussion started by: frsuhail001
3 Replies

2. Solaris

Disk Space

I know there are other threads but they have not helped. My server is running low on disk space and I haven't been able to re-allocate. I think my solaris machine is missing tools or the way it was originally setup, may not have the right pathing. $ df -k Filesystem kbytes used... (5 Replies)
Discussion started by: lnxjenn
5 Replies

3. Filesystems, Disks and Memory

A tcpdump-like tool for disk I/O?

Hi, can anyone please suggest a tool to dump i/o packets just like tcpdump does for network traffic. Basically I have a complex dataflow that needs to be optimized and I want to see how packets go to/from disk - what goes randomly and sequentially. Thanks (8 Replies)
Discussion started by: vsmi
8 Replies

4. AIX

reduce used paging space

Hi I have used gzip on AIX and the used paging space has jumped from 7% to 20%. The gzip process is finished since a long time. But the used paging space is still the same. How to release this space ? (1 Reply)
Discussion started by: bfarah
1 Replies

5. Shell Programming and Scripting

Disk Space

HI ... I am New to the Unix...I am trying to write a script to check the disk space. But i am not able to write it. I know the command to check the disk space df -k,but unable to write the script..Can any body help me... Thanks in advance... (3 Replies)
Discussion started by: Kingkon
3 Replies

6. HP-UX

Disk Space

Hi Experts. I had 100% disk full , even though i have removed 2 GB space still dbf command shows 100%. How to rectify that. Appreciate your prompt help. Thanks (1 Reply)
Discussion started by: test10002
1 Replies

7. Solaris

Disk space?

I'm a Unix newbie running Solaris 9. After installing a fresh copy on a 40GB drive I noticed the available disk space is 2% free or approximately 200MB available. Is that possible? Did I do something wrong? (4 Replies)
Discussion started by: jbarbuto
4 Replies

8. UNIX for Dummies Questions & Answers

available disk space on disk device???

Hello, Can someone please tell me which command to use to determine the available disk space on a given disk device? I have to write a shell script that compresses files and stores them in a specific location but I am not sure how "conservative" I should be? Thanks in advance! Al. (4 Replies)
Discussion started by: alan
4 Replies

9. UNIX for Dummies Questions & Answers

Out of disk space?

Hi I'm trying to install gcc and the installation program tells me that I'm out of disk space! I have just installed the os (using the default settings for partitions and sizes) and have only installed apache on the machine. Can it really be out of disk space already? How do I check how much... (4 Replies)
Discussion started by: alfabetman
4 Replies
Login or Register to Ask a Question