summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortristan <steckbrief@geekmail.de>2019-03-17 14:05:21 +0100
committertristan <steckbrief@geekmail.de>2019-03-17 14:05:21 +0100
commitefaa44fdbbbe8dfe9bf3718186eb71dd81199ab1 (patch)
treedad5807387129dc5b2407d466926fd0fe673b745
parentbad57f1e5875fb271f1f592ee22cfb99aa887ef3 (diff)
adds some samples to count requests
Diffstat (limited to '')
-rwxr-xr-xcountAllRequests.sh2
-rwxr-xr-xcountBlockedRequests.sh2
-rwxr-xr-xstatRequestsPerAddress.sh2
-rwxr-xr-xstatRequestsPerBlockedAddress.sh2
4 files changed, 8 insertions, 0 deletions
diff --git a/countAllRequests.sh b/countAllRequests.sh
new file mode 100755
index 0000000..87d88bc
--- /dev/null
+++ b/countAllRequests.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+grep query /var/log/dnsmasq/dnsmasq.log* | wc -l
diff --git a/countBlockedRequests.sh b/countBlockedRequests.sh
new file mode 100755
index 0000000..e282383
--- /dev/null
+++ b/countBlockedRequests.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+grep 'block.list' /var/log/dnsmasq/dnsmasq.log* | wc -l
diff --git a/statRequestsPerAddress.sh b/statRequestsPerAddress.sh
new file mode 100755
index 0000000..e274f3a
--- /dev/null
+++ b/statRequestsPerAddress.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+grep query /var/log/dnsmasq/dnsmasq.log | awk '{print $6}' | sort | uniq -c | sort -h
diff --git a/statRequestsPerBlockedAddress.sh b/statRequestsPerBlockedAddress.sh
new file mode 100755
index 0000000..9abefd3
--- /dev/null
+++ b/statRequestsPerBlockedAddress.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+grep /block.list /var/log/dnsmasq/dnsmasq.log | awk '{print $6}' | sort | uniq -c | sort -h