LinuxQuestions.org
Register a domain and help support LQ
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 03-23-2009, 11:25 PM   #1
noir911
Member
 
Registered: Apr 2004
Location: Baltimore, MD
Posts: 681

Rep: Reputation: Disabled
tshark output to file


I'm trying to get tshark output to file but it's not working

Tried:

Quote:
tshark -i eth0 -n port 68 -R 'bootp.type == 2' -o
column.format:'"Source MAC","%hs"' > /tmp/capture &
but get nothing in the file. ps -ef | grep shark shows tshark -i eth0
-n port 68 -R bootp.type == 2 -o column.format:"Source MAC","%hs"

pkill tshark - and I get the /tmp/capture file with all the entries!

Also tried

tshark -i eth0 -n port 68 -R 'bootp.type == 2' -o
column.format:'"Source MAC","%hs"' | tee /tmp/file

nothing in the file and when I do ctrl-c, I get entries in the file.
 
Old 03-25-2009, 06:17 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,462

Rep: Reputation: 2119Reputation: 2119Reputation: 2119Reputation: 2119Reputation: 2119Reputation: 2119Reputation: 2119Reputation: 2119Reputation: 2119Reputation: 2119Reputation: 2119
Sounds like you're Suffering from Buffering http://perl.plover.com/FAQs/Buffering.html (its not just a Perl thing btw)
 
  


Reply


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
tshark gives "permission denied" writing to (any) file in home dir. kr0m3 Linux - Networking 2 12-16-2009 06:40 AM
Output Redirection - Trying to output to screen and file? helptonewbie Linux - Newbie 7 03-19-2009 07:05 AM
tshark dump HTML page adityaj123 Linux - Networking 0 05-10-2008 01:23 PM
can i logged output of tshark as bin file? Barq Linux - General 3 03-03-2008 06:56 AM
the sound gives output when using mic but no output when run a music file medo Debian 0 04-19-2004 07:17 PM


All times are GMT -5. The time now is 04:00 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration