This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

How to capture on all interfaces with a single Tshark command?

0

Current wireshark version support capturing on multiple adapters at the same time, can we do this from the command line as well? At the moment i'm stuck with:

C:\Progra~1\Wireshark\tshark.exe -i 2 -a duration:600 -n  -w "%subor%"

i would very much like something like this:

C:\Progra~1\Wireshark\tshark.exe -i any -a duration:600 -n  -w "%subor%"

is this possible? Thanks!

asked 27 Apr '12, 02:06

Marc's gravatar image

Marc
147101316
accept rate: 27%


One Answer:

1

By "current version" I assume you mean trunk or 1.7.x, right?

The tshark man page for those versions says that you can use the "-i" option multiple times to specify capturing on multiple interfaces.

(1.6 only supports capturing on multiple interfaces on Linux where the pseudo-device "any" can be used.)

answered 27 Apr '12, 07:59

JeffMorriss's gravatar image

JeffMorriss ♦
6.2k572
accept rate: 27%

Ah, very good Jeff, thanks!! i did not know you could also repeat the -i option, (and yes i meant 1.7.2)

(03 May '12, 10:20) Marc
1

As this is a Q&A site, please don't forget to Accept the answer if it answered your question--see the FAQ.

Anyway, you're welcome!

(03 May '12, 10:36) JeffMorriss ♦