summaryrefslogtreecommitdiff
path: root/contrib/accesslistmon/examplescript
blob: 23a0a46e73a4358951d4e75f6b72fc5319f9e198 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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.