690 shaares
3 liens privés
3 liens privés
3 résultats
taggé
log
Analyser log Apache en ligne de commandes :
Top 50 des urls :
awk -F'[ "]+' '{ urls[$7]++ } END { for (i in urls) {printf "%15s - %d\n", i, urls[i] } }' file_log | sort -nk 3 | tail -n 50
Top 50 des ips :
awk -F'[ "]+' '{ ipcount[$1]++ } END { for (i in ipcount) {printf "%15s - %d\n", i, ipcount[i] } }' file_log | sort -nk 3 | tail -n 50
apache custom log format
Exemple :
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b %D" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent