Browse Source

Added statistics on users'ip (#3807)

chapril-1.2.1
Didier Clermonté 2 years ago
committed by root
parent
commit
4d12ffbc4f
  1. 12
      tools/rapport_activite.sh

12
tools/rapport_activite.sh

@ -1,3 +1,4 @@
#!/bin/bash
#
# Copyright (C) 2018, 2019 Didier Clermonté <dclermonte@april.org>
@ -64,7 +65,15 @@ generateReport()
pasteCount=$(find /var/www/paste.chapril.org/data -mindepth 3 -maxdepth 3 -type f | wc -l)
echo "Nombre de pastes dans la base actuellement = $pasteCount"
echo
ipTotalCount=$(zgrep -h "$monthEnglish" /var/log/apache2/paste.chapril.org/paste.chapril.org-acces.log*|grep "$year"|grep -vi bot|grep -v check_http|cut -d' ' -f1|sort|uniq |wc -l)
echo "Nombre d'ip visiteuses = $ipTotalCount"
ipUtilCount=$(zgrep -h "$monthEnglish" /var/log/apache2/paste.chapril.org/paste.chapril.org-acces.log*|grep "$year"|grep -vi bot|grep -v check_http|grep -v "GET /fonts/"|grep -v "GET \(/css/\|/images/\|/ \)"|grep -v "GET /js/"|grep -v "HTTP/1.0\" 404"|cut -d' ' -f1|sort|uniq| wc -l )
echo "Nombre d'ip utilisatrices = $ipUtilCount"
echo -e "\n"
}
@ -125,3 +134,4 @@ else
echo -e "Bad parameter."
help
fi

Loading…
Cancel
Save