Grep
Différents Grep possibles :
grep "03\/Mar\/2016\:15\:5" access.log | awk '{print $1}' | sort | uniq -c | sort
grep "http://mon.site.web/sites/default/files/0340.jpg" access.log | awk '{print $1}' | sort | uniq -c | sort
grep "25/Mar/2016:09" /patch/to/files/logs/access.log |awk '{print $1}' | sort | uniq -c | sort -rn | head -10
grep " http://mon.site.web" access.log | grep " 503 "
grep "29/Mar/2016:20:" access.log | awk '{print $1}' | sort -n | uniq -c | sort | tail -n 10
grep "http://mon.site.web" access.log | grep "HTTP\/1.1\" 404"
Zcat massif dans les logs gzippés :
zcat -f access.log* | grep -c "GET /sites/default/files/0340.jpg"
Afficher les varnishlogs pour rechercher de pattern :
varnishlog | grep X-Forwarded-For
Affichage de la liste des 10 IP qui font le plus de POST :
grep POST access.log | awk '{print $1}' | sort | uniq -c | sort | tail -10
Affichage de la liste des 10 IP qui font le plus de HITS dans les logs :
tail -n 100000 access.log | awk '{print $1}' | sort | uniq -c | sort | tail -10