Need to count clicks off directory listing.

Need to count clicks off directory listing.

Posted by: n715dp
Posted on: 2007-02-03 06:59:00

Is there a way to keep track of clicks off a directory listing? I have a folder that just has files in it, available for download (totally legal) and it is just using default apache directory listing... I would like to be able to count the number of clicks for each of the files in this listing, is there a way to do this? The built in analog stats really suck and don't tell me anything... additionally, grep'ing through the logs doesn't give me an accurate click count because of 206 partial content responses.

Thanks.

Re: Need to count clicks off directory listing.

Posted by: ardco
Posted on: 2007-02-03 07:02:00

In reply to:

grep'ing through the logs doesn't give me an accurate click count because of 206 partial content responses.


Do a double grep?

grep filename logname|grep " 200 " |wc

or

grep filename logname|grep -v " 206 " |wc

Re: Need to count clicks off directory listing.

Posted by: n715dp
Posted on: 2007-02-03 07:14:00

the first one is no good because it is 2007 and |grep 200 counts all lines due to the date... I know I could use awk to grep in the correct column but I am just too lazy... I hadn't thought of using -v to exclude 206... thanks for that... will give it a try.

I was hoping there would be some kind of script out there that I could use to do this and make a nice table of per day and whatnot but I may be looking for something that doesn't exist.

Re: Need to count clicks off directory listing.

Posted by: ardco
Posted on: 2007-02-03 07:19:00

|grep 200

|grep " 200 "

See the quotes?

There may be a script somewhere, but I don't know of it.

Re: Need to count clicks off directory listing.

Posted by: ardco
Posted on: 2007-02-03 07:21:00

PS. Using -c option of the last grep is probably slightly more efficient than |wc...

Re: Need to count clicks off directory listing.

Posted by: n715dp
Posted on: 2007-02-03 07:33:00

I see the quotes now, thank you :)

Re: Need to count clicks off directory listing.

Posted by: ardco
Posted on: 2007-02-03 08:32:00

You're welcome. My suggestions are for totally legal purposes only. cool

Re: Need to count clicks off directory listing.

Posted by: nathan823
Posted on: 2007-02-03 18:00:00

In reply to:

The built in analog stats really suck


a lot of people are complaining about the analog. Is it possible to request DH to upgrade it? Or shall we start another poll? ha...

Re: Need to count clicks off directory listing.

Posted by: rlparker
Posted on: 2007-02-03 18:08:00

In reply to:

The built in analog stats really suck


It depends on what you need, and what you like, and what you are used to. Analog serves my needs well enough; I can always grab my logs and process them myself if I want something different. wink

You can also install another stat package that you like better!

--rlparker

Tags: directory listinganalog statsgreplogsapacheing