Forum Moderators: phranque

Message Too Old, No Replies

how to record logs of bandwidth for a entire website

how to record logs of bandwidth for a entire website

         

gudumba

10:53 am on Mar 28, 2008 (gmt 0)

10+ Year Member



hi folks,

I have one custom task to record the bandwidth consumed, for a website.

I wrote one php script that will measure the bandwidth of a URL passed.

but, i think thats not the correct idea, as my script will read the source and calcualte all files sizes.

my task is to Measure bandwidth of a website in real-time.

how to proceed,?

any idea will be appreciated.!

Thanks.

appi2

11:47 am on Mar 28, 2008 (gmt 0)

10+ Year Member



Probably not really what your looking for but

awk '{sum+=$10} END{print sum}' yourlogs.log

would use the apache log and sum the file size column.

You may have a different setup so try altering $10 for other values $9 $8 etc.

type awk {print $10} to see if its getting the right column and play with stuff :)