diff options
-rwxr-xr-x | countAllRequests.sh | 2 | ||||
-rwxr-xr-x | countBlockedRequests.sh | 2 | ||||
-rwxr-xr-x | statRequestsPerAddress.sh | 2 | ||||
-rwxr-xr-x | statRequestsPerBlockedAddress.sh | 2 |
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 |