I need to get the rate at which certain packets (i.e. LDAP) arrive on a interface in a linux environment.
I was thinking of using tcpdump to filter the wanted packets and subsequently monitor the rate at which rx packets are seen. Perhaps by monitoring the rate of writes/s to tcpdump output file?
Or perhaps even better iptables where i would match packets by certain rule and then somehow get the packet rate for packets matching this rule.
Any idea how this could be done?
Thanks!