Reputation: 3511
Is it possible with tcpdump
to count (for some set up time) the number of outgoing and incoming UDP packets?
I don't have much experience in tcpdump
, so an advice how to do that would be very helpful.
I read that a timeout
commend is good if I want to stop a process after some given time, so I was thinking about just stopping tcpdump
after my time. But how I can count the number of outgoing and incoming packets and filter only UDP packets?
Upvotes: 0
Views: 2479
Reputation: 1675
To count outgoing UDP packets, run tcpdump -Q out udp > outgoing
and count the number of lines of the outgoing
file.
To count incoming UDP packets, run tcpdump -Q in udp > incoming
and count the number of lines of the incoming
file.
Upvotes: 0