Measuring bandwidth output to a folder
Moderator: General Moderators
- genetix
- Forum Contributor
- Posts: 115
- Joined: Fri Aug 01, 2003 7:40 pm
- Location: Sask, Regina
- Contact:
Measuring bandwidth output to a folder
I'm working on a new file management system and I have run into a fork!
I can either count my clients "bandwidth" by page views or actual bandwidth. I have decided to use both(having it differ between hosting packages for beginners or experts).
Whats the easiest way to track the bandwidth on a folder? My clients each have a root folder(their username) on my hosting section of my webserver. Is there a program available which sits in the background on my server and monitors specified folders?
I can either count my clients "bandwidth" by page views or actual bandwidth. I have decided to use both(having it differ between hosting packages for beginners or experts).
Whats the easiest way to track the bandwidth on a folder? My clients each have a root folder(their username) on my hosting section of my webserver. Is there a program available which sits in the background on my server and monitors specified folders?
- genetix
- Forum Contributor
- Posts: 115
- Joined: Fri Aug 01, 2003 7:40 pm
- Location: Sask, Regina
- Contact:
I was just snooping through my Apache logs and found a very easy way to count page views without adding scripts to every page a client has. Is there a way I can multiply the size of a page by how many times its view to get bandwidth or is that way off the island?
(Sorry about refering to an island but right now it has been blizarding literally ALL day and I can't keep the 4 foot snow bank off my driveway. I shovel every 3 hours and it takes me 2 hours to get rid of all the snow. Thank god for neighbours who have enough snowblowers that they do the street on the way to my house....)
(Sorry about refering to an island but right now it has been blizarding literally ALL day and I can't keep the 4 foot snow bank off my driveway. I shovel every 3 hours and it takes me 2 hours to get rid of all the snow. Thank god for neighbours who have enough snowblowers that they do the street on the way to my house....)
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
the ~standard log I have has a quoted string (preceeded by the timestamp) that contains the http request. After that is the http response code sent back. The number following this is the bytes sent back. Beware that when no content is sent back, Apache typically will place a dash (minus) instead of zero. Also beware that the bytes sent is content only. Not header information, packet sizes or anything to that fact. So your numbers will be off unless you start tracking your header sizes too.. 
- carlmcdade
- Forum Newbie
- Posts: 24
- Joined: Thu Dec 02, 2004 2:19 am
- Location: sweden
- genetix
- Forum Contributor
- Posts: 115
- Joined: Fri Aug 01, 2003 7:40 pm
- Location: Sask, Regina
- Contact:
I'm using this for my own control panel though. Thats the problem.carlmcdade wrote:The easiest way that I know of to get Apache/webhost to correctly measure traffic to a folder is to set a subdomain name to that folder using cpanel or the like.
http://www.webdummy.net/serverpro/login.php
username: demo
password: demo
- genetix
- Forum Contributor
- Posts: 115
- Joined: Fri Aug 01, 2003 7:40 pm
- Location: Sask, Regina
- Contact:
It turns out this is going to be a lot harder than I though with my current setup.
Are there any programs that "stand behind" apache and logs activity? What do other systems like CPanel or Plesk use?
*EDIT*
I found a few programs to detect bandwidth but I couldn't find any that watch the bandwidth output on a group of root folders.
To make matters worse I need to be able to add users from a internet script(admin part of my control panel). I also need one that logs the bandwidth in a txt or ini file so I can select it.
I'm starting to think I may need to ask a friend a REALLY big favour...
Are there any programs that "stand behind" apache and logs activity? What do other systems like CPanel or Plesk use?
*EDIT*
I found a few programs to detect bandwidth but I couldn't find any that watch the bandwidth output on a group of root folders.
To make matters worse I need to be able to add users from a internet script(admin part of my control panel). I also need one that logs the bandwidth in a txt or ini file so I can select it.
I'm starting to think I may need to ask a friend a REALLY big favour...