TCPDump Top-Talkers script

tcpdump -tnn -c 20000 -i eth0 |\It's nothing like perfect, for it only shows the number of packets a machine's blowing out the NIC and not the size of each one, but that's something which we can add in, I figure. It's quick, though, and gives a relatively useful ballpark figure, which is all I need today.
awk -F "." '{print $1"."$2"."$3"."$4}' |\
sort | uniq -c | sort -nr |\
awk ' $1 > 100 '
Yay for google and tcpdump!
<< Home