Welcome to Server Circle. It's a friendly site and all levels of experience are welcome. Be aware that we use cookies for your login.
Server Circle - Ask questions about Servers and get answers from experts.
Beta (0.98 sec)
REWARD: Counting broadcast and multicast packets in a script

I need to know if there's too much noise on a subnet so I'd like to automate a way of telling me how many broadcast and multicast pps (packets per second) are on a subnet.

I can't figure out a good way of doing it though.

I'm keen to keep my hard earned points so I'll happily give a £10 Amazon Voucher to the Best Answer (the voucher can be towards your preferred Amazon site: .com, .fr, .de or .co.uk etc).
Asked by:
Mayhew
982 points
 Report Abuse
 Share Page - Category: Networking - Tags: REWARD: Counting broadcast and multicast packets in a script
 Enter your response
Please use Pastie.org to paste lengthy code or to fix formatting issues with code
  • Responses in reverse (6)

Best Answer

I just noticed that not all versions of netstat on Linux give the same information (for instance squeeze's doesn't give you the multicast statistics).

You can also get the information directly from /proc (/proc/net/snmp, /proc/net/netstat, /proc/net/snmp6). You can also install a snmp agent on the server to be able to query that information remotely (and locally as well).

snmptable -v2c -c <community> <hostname> .iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable

snmptable -v2c -c <community> <hostname> .iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable


Response by:
s
3383 points
User "s" please let me know which Amazon site you want your voucher from and Server Circle will send it.

Response by:
Mayhew
982 points
Thank you, @s !

I will avoid the scripting method and install ntop and set up SNMP from the switches. netstat -s is also very useful for my needs.

I contacted Server Circle to pass on my &pound;10 Amazon voucher.

Response by:
Mayhew
982 points
Thank you very much, @s.

I didn't know about pv before. That command line is very,very close to what I need.

That's perfect for a realtime look and I've put and not arp after multicast to ignore ARP traffic.

I'm really looking for a script to grab, say, five values at three times a day and then mail me the results from cron.daily so I can look for trends over the last day to see if noise on the subnet has increased.


Response by:
Mayhew
982 points
Sorry, it's Debian.

Response by:
Mayhew
982 points
Which OS are you on ? Can you please let me know ?

Response by:
Squeeze
754 points


  • Related Questions
About Us : Contact Us : Etiquette : Terms : CDN Failover : ShorterURL : CDN Fallback : © 2013 Server Circle