Wireshark mailing list archives
Re: how to run tcpdump on background
From: Flako <subforos () gmail com>
Date: Tue, 2 Oct 2012 16:56:08 -0300
2012/10/2 Guy Harris <guy () alum mit edu>:
On Oct 2, 2012, at 11:10 AM, esolve esolve <esolvepolito () gmail com> wrote:I have a script where I want to run tcpdump and then immediately run another command however, tcpdump will cause the shell pause/hang so the following command lines will have no chance to run even if I use &, it doesn't help like [root@ket capture]# tcpdump -i eth0 -w temp & [2] 32076 [root@ket capture]# tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes it always switches to foreground even with &Why do you think it's in the foreground? The fact that it prints to the (pseudo-)terminal doesn't mean that - background jobs can write to the terminal (unless you do "stty tostop", which means they'll stop if they try to write to the terminal, but that's not what you want), they just can't *read from* the terminal without stopping.
You Send It output to a log file. This command generates log files of 700MB tcpdump -n -i eth0 -s 65535 -w tcpdump-$HOSTNAME-$(date +"%Y%m%d-%H%M").log -C 700& ___________________________________________________________________________ Sent via: Wireshark-users mailing list <wireshark-users () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-users Unsubscribe: https://wireshark.org/mailman/options/wireshark-users mailto:wireshark-users-request () wireshark org?subject=unsubscribe
Current thread:
- how to run tcpdump on background esolve esolve (Oct 02)
- Re: how to run tcpdump on background Guy Harris (Oct 02)
- Re: how to run tcpdump on background Flako (Oct 02)
- Re: how to run tcpdump on background Guy Harris (Oct 02)
- Re: how to run tcpdump on background Flako (Oct 02)
- Re: how to run tcpdump on background Guy Harris (Oct 02)