Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > 7ca84d00a753576dfaee15bac39038f0 > files > 62

mrtg-2.14.5-4.el5.x86_64.rpm

#!/bin/bash
rsh x.x.x.x sh access-list 102 | grep icmp | grep matches | grep x.x.x.x | awk ' { print $8 }' | sed s/\(//
echo "0"

#The first line will rsh into the router and display access-list number 102 (this will change
depending on your config), it will grep the access-list entry type in this case 'icmp', it
will also grep the ip of the machine in question, and output the relevant information.

Eg:

10
0

10 = the number of times the ACL has matched.

Remember you can change this to whatever you want.