I have a website (project) where users get logged in, do their work and then they log out.

I need to build a report that displays how much each person has used of data. (bandwidth, how much was downloaded in Kb, etc)

So the process may be like counting start of usage from user login to user logout.

I have seen a little about Webalizer and AWStats for something like this, But I am not sure how they work. I have tried Content-Length but some pages don't send content-length.I have also seen mod_bandwidth but still I am little confused.

This process is needed for my site because now, our company is thinking of charging per usage and also bandwidth allocation for each users (according to their membership).

I haven't worked with this type of tools, I am newbie in this matter. I have done only simple websites not any setting like this in Apache or Linux. My project is in Codeigniter.

  • Do you mean look up the "consumption" of a specific user, or calculate the average/mean across all users? – Nemo Nov 30 '16 at 11:36

I never researched that topic but all i can think of is writing your own script, it may take some time but it is an easy job if you are a programmer.

If i were you i would ask myself the following questions as start before working on that project,

  • What type of downloadable data i am offering? [media/text/app,... etc]
  • Will i allow partial downloads and resuming downloads?
  • Will i charge per download or per bandwidth usage?
  • Which data i need to log? [userId,date,downloadedData,... etc]

And upon those answers i would determine the functionality to be implemented.

Long story short, you want to track your users actions, users who only you know about as they are stored in your database that has its unique structure, making it kinda hard to find some tool to do the job for you which leaves you with only one option that is writing that tool yourself.

| improve this answer | |
  • This will not work on other types of files like images and javascript etc.. I have seen help full answer HERE , but I still not able to get this things clear. – Dharmik Jan 4 '13 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.