From 4de32df94689f5eb0f9712ab29a7b9b50f15c62b Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 29 Jan 2022 19:51:23 +0100 Subject: better --- openbsd/frontends/scripts/sitestats.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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' -- cgit v1.2.3