Added statistics on users'ip (#3807)
This commit is contained in:
parent
96b74c88e9
commit
4d12ffbc4f
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright (C) 2018, 2019 Didier Clermonté <dclermonte@april.org>
|
# 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)
|
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 "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."
|
echo -e "Bad parameter."
|
||||||
help
|
help
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue