getting meaningful access logs
Hi all, got a funny one here
I run a local community news website,
I've got a monitor running a tail of the access.log to keep an eye on what people are getting up to,
because I don't want each page read filling the whole screen with details of gif downloads I have in the past used
$tail -f var/log/apache/access.log | grep php
to make sure I'm only getting page reads
now that we've moved the site to a proper server with it's own domain though the server is properly set up so that www.foo.foo (for example) brings up the index.php page.
the problem is that these front page hits don't get logged as php pages, just straight
"GET / HTTP/1.0"
this isn't just a problem for what I stream on the monitor, I used to grep out the meaningful files from the access.log to create a file for doing analysis on,
the raw access.log being filled with gif and jpg hits to say nothing of java scrollers, not to mention code red and nimda hits.
i've tried:
$tail -f /var/log/apache/access.log |grep "[php|/ HTTP]" (still get everything)
$tail -f /var/log/apache/access.log |grep -v "[jpg|gif]" (get nothing)
$tail -f /var/log/apache/access.log |grep -v gif |grep -v jpg (also get nothing)
at the moment I'm using
$tail -f /var/log/apache/access.log |grep -v gif
which is at least somewhat readable on the monitor but still won't yeild good analysis
I'm sure it's just a little thing I'm doing wrong in grep (regexp is outside of my skilset) does anyone have any ideas?
TIA
John
Reply to: