Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tcpdump without Terminal

0 views
Skip to first unread message

Gnarlodious

unread,
Jan 27, 2005, 10:52:49 AM1/27/05
to
Is there a way to run tcpdump directly from the shell, without keeping a
Terminal window open? I'm writing the output to a file.

Thanks.

-- Gnarlie

Jeremiah DeWitt Weiner

unread,
Jan 27, 2005, 11:00:23 AM1/27/05
to
Gnarlodious <gnarl...@yahoo.com> wrote:
> Is there a way to run tcpdump directly from the shell, without keeping a
> Terminal window open? I'm writing the output to a file.

That question is more than a little ambiguous. Could you describe
exactly what you're trying to do, what you are doing, and why what you
are doing now doesn't work for you? I'm guessing that you find that
tcpdump dies if you close the window you started it in; have you tried
'nohup tcpdump > myfile &'?

JDW

Gnarlodious

unread,
Jan 27, 2005, 2:34:54 PM1/27/05
to
Entity Jeremiah DeWitt Weiner spoke thus:

Thanks for the tip, now I am running a file:

sudo nohup tcpdump -i en1 port 80 > /private/tmp/port80.log

Unfortunately the application calling this file now freezes up and needs to
be forcequit.
Is there a way to launch tcpdump without crashing up a process? If so, can
the tcpdump instance be halted from the shell too?

Thanks.

Bruce Barnett

unread,
Jan 27, 2005, 11:17:32 PM1/27/05
to
Gnarlodious <gnarl...@yahoo.com> writes:

> Thanks for the tip, now I am running a file:
>
> sudo nohup tcpdump -i en1 port 80 > /private/tmp/port80.log
>
> Unfortunately the application calling this file now freezes up and needs to
> be forcequit.

I'm not sure which application you are talking about, but did you try

sudo nohup tcpdump -i en1 port 80 > /private/tmp/port80.log &


Some of the versions of tcpdump I have used didn't flush the output
file if I used a "kill ". I have to terminate the tcpdump process with
kill -1 <pid>

to make sure I got the entire packet.

> Is there a way to launch tcpdump without crashing up a process? If so, can
> the tcpdump instance be halted from the shell too?

I have NEVER seen tcpdump crash a process.

Have you used "ps" to find out what was happening?

--
Sending unsolicited commercial e-mail to this account incurs a fee of
$500 per message, and acknowledges the legality of this contract.

0 new messages