LoginSignup
3
3

More than 5 years have passed since last update.

tomcatの平均レスポンスタイムを集計するワンライナー

Posted at

個人的メモ

grep hegehoge/upload /var/log/tomcat/access_log.20150316 | cut -d'"' -f7 | sort -nr | head -n 1000 | awk '{m+=$1} END{print m/NR;}'

Tomcatのログ出力は下記Valveを前提。

<Valve className="org.apache.catalina.valves.AccessLogValve"
    directory="/var/log/tomcat"
    fileDateFormat="yyyyMMdd"
    prefix="access_log."
    suffix=""
    pattern='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i" %D'
/>
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3