summaryrefslogtreecommitdiff
path: root/openbsd/frontends
diff options
context:
space:
mode:
authorPaul Buetow <openbsd@mx.buetow.org>2022-01-29 19:51:23 +0100
committerPaul Buetow <openbsd@mx.buetow.org>2022-01-29 19:51:23 +0100
commit4de32df94689f5eb0f9712ab29a7b9b50f15c62b (patch)
tree87da6c774cdb339e873db20770a9b2e31e067902 /openbsd/frontends
parent2ecb7f46a8eea6a9a7aca9a59db61628cac69679 (diff)
better
Diffstat (limited to 'openbsd/frontends')
-rwxr-xr-xopenbsd/frontends/scripts/sitestats.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/openbsd/frontends/scripts/sitestats.sh b/openbsd/frontends/scripts/sitestats.sh
index 6903a07..16738fd 100755
--- a/openbsd/frontends/scripts/sitestats.sh
+++ b/openbsd/frontends/scripts/sitestats.sh
@@ -55,7 +55,9 @@ stats () {
top_n () {
fields="$1"
- echo "Top $TOP `head -n 1 $STATSFILE | cut -d, -f"$fields"`:"
+ descr="$2"
+
+ echo "Top $TOP `head -n 1 $STATSFILE | cut -d, -f"$fields"`$descr:"
cut -d, -f"$fields" | sort | uniq -c | sort -nr | head -n $TOP | indent
echo
}
@@ -73,6 +75,8 @@ ip_stats () {
main () {
parse_logs
filter
+ stats | grep -F .suffix | top_n '1,2,4,5,7' ' (Only .suffix)'
+ stats | grep -F atom.xml | top_n '1,2,4,5,7' ' (Only atom.xml)'
stats | top_n 1
stats | top_n 2
stats | top_n '4,5'