LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-29-2015, 08:13 AM   #1
hunter86_bg
LQ Newbie
 
Registered: Jan 2012
Posts: 9

Rep: Reputation: Disabled
Compression for Remote "Live" packet capturing


Hi guys,
frequently I have to solve some problems by capturing packets on the client's machine.The problem is that the client's Internet Connection is very , very slow. Most of the time I have to create huge pcap files which later I upload to my machine for "debugging" with wireshark.
But sometimes the time is very limited and I issue the following commands to create a "Live" capture:
Code:
#mkfifo /tmp/pipe1
#ssh root@<server> "tcpdump -s 0 -U -n -w - -i <server's network device> not port 22" > /tmp/pipe1
#wireshark -k -i /tmp/pipe1
I'm looking for a way to further compress the output from tcpdump. I tried "-z gunzip" to a file to test compression - but it doesn't do anything (same as without -z). If you know a working way to even compress further the tcpdump output, I would be very happy.
 
Old 07-29-2015, 08:28 AM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
maybe this will work:
Code:
tcpdump -s 0 -U -n -w - -i <server's network device> not port 22" | bzip2 > /tmp/pipe1
bunzip2 -c /tmp/pipe1 | wireshark -k #-i /tmp/pipe1

Last edited by schneidz; 07-29-2015 at 08:29 AM.
 
Old 07-29-2015, 08:48 AM   #3
hunter86_bg
LQ Newbie
 
Registered: Jan 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
I've never thought about bzip2... Thanks mate.
 
  


Reply



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] When I type "sudo grub" it says "command not found" in Ubuntu 9.10 Live CD. msbstar Linux - Newbie 10 04-01-2020 11:54 PM
teamviewer "show black screen" and "disable remote input" in x11vnc ? alirezaimi Linux - Networking 1 02-07-2017 02:00 AM
LXer: "Minimal Linux Live" version "25-Aug-2014" has been released LXer Syndicated Linux News 0 08-24-2014 08:01 AM
packet capturing on remote machine ajink Linux - Networking 2 05-20-2010 12:10 AM
Does "ac97 & RH8" imply "buy a Sound Blaster Live"? nicktoop Linux - Hardware 3 02-13-2004 08:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:41 PM.

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