pero on anything

May 8th, 2007

Aggregate Traffic Used From a Combined Apache Logfile

Today I just wanted to know the traffic sent out by one of our apaches for a certain client. Our administrator came up with the following code that did it – awesome! #!/bin/sh for file in [path to your logifes]/*.bz2; do echo -n ” $(basename $file) ” >> ~/traffic.out; bzcat $file | awk ‘BEGIN{ regex=”^/clientFolder/”;summe=0;} [...]