1
vote
2answers
122 views

How to use AWK to generate bandwidth report in Apache

I have my Apache logs set up like this: LogFormat "%v %t %I %O" billing How can I use AWK to generate a report which shows me the total bandwidth (received + sent) in MB per virtual host? Here's ...
1
vote
1answer
148 views

Logging varnishlog output to a file with awk in daemon mode

I would like to daemonize the answer in this topic http://serverfault.com/a/480871/94127. Since varnishlog has daemon mode, I tried to use -D option as below. But the timestamps are not appearing. ...
0
votes
0answers
122 views

How to get range time a log file in shell script

How to get range time using awk command? I have two variables $from and $to with format (hh:mm:ss) I want to get the range time between two variables. For example: get all range time between: ...
2
votes
2answers
132 views

Gathering IP's from a complicated log

I have a question regarding the use of some more advanced grep, awk, sed. I have a log file, for a proprietary MTA, that contains IP's in a string, delimited by [redacted]^~x.x.x.x^[redacted]. So far ...
37
votes
12answers
38k views

Do you have any useful awk and grep scripts for parsing apache logs?

I can use log analyzers, but often I need to parse recent web logs to see what's happening at the moment. I sometimes do things like to figure out top 10 ips that request a certain file cat foo.log ...