Skip to content

Instantly share code, notes, and snippets.

@thomaswitt
Created November 6, 2013 10:34
Show Gist options
  • Save thomaswitt/7333983 to your computer and use it in GitHub Desktop.
Save thomaswitt/7333983 to your computer and use it in GitHub Desktop.
Get Apache Transfer Volume from access_log
#!/bin/sh
echo "Statistik für Logfile $1"
awk '{sum+=$10} END {printf "%.2f GByte Transfervolumen\n",sum/1073741824}' $1
echo "$(wc -l < "$1" | sed 's/[^[:digit:]]//g') Requests"
#echo "$(grep -ivE '(.js|.css|.pdf|.gif|.jpg|.jpeg|.png|.tif|.tiff|.mp3|.mp4a|.aac|.mpg|.mp4|.mov|.flv|.swf|.zip|.gz|.rpm|.tgz|.doc|.xls|.ppt|.wmv|.avi|.wav|.ico|.exe)' "$1" | wc -l | sed 's/[^[:digit:]]//g') Requests auf Assets"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment