summaryrefslogtreecommitdiff
path: root/openbsd/frontends/scripts/sitestats.sh
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd/frontends/scripts/sitestats.sh')
-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'