揮発性のメモ2

http://d.hatena.ne.jp/iww/

2011-05-18から1日間の記事一覧

webサーバのログから変なアクセスをしてくるIPのトップテンを抽出とか

$ tail -n 100000 /var/log/apache2/error.log | perl -pe 's/^.*client ([.\d]*).*$/\1/' | sort | uniq -cd | sort -n | tail -n10過去10万くらいのエラーだったアクセスからトップテンを抽出する