0

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?

Ziva
  • 3,181
  • 15
  • 48
  • 80

1 Answers1

0

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.

kaitoy
  • 1,545
  • 9
  • 16