summaryrefslogtreecommitdiff
path: root/contrib/accesslistmon/examplescript
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/accesslistmon/examplescript')
-rwxr-xr-xcontrib/accesslistmon/examplescript16
1 files changed, 16 insertions, 0 deletions
diff --git a/contrib/accesslistmon/examplescript b/contrib/accesslistmon/examplescript
new file mode 100755
index 0000000..23a0a46
--- /dev/null
+++ b/contrib/accesslistmon/examplescript
@@ -0,0 +1,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.