Web Hosting Talk







View Full Version : Need a script to measure the bandwith usage!


important
03-17-2002, 02:51 PM
Need a script to measure bandwith usage per directory for a server running windows 2K. Its URGENT, all kind of help is greately appreciated :rolleyes:

important
03-19-2002, 10:43 AM
:angry: This bandwith measurement really sucks, is there any free control panel which measures bandwith, so i can take a look at the script and see how its done. And then i can write one by myself. But something to let me get an idea about it.
If any of you people got idea, how this bandwith measurement works, please let me know :mad:

vselvara
03-19-2002, 02:14 PM
Most of those bandwidth monitoring scripts look at the web logs and add up the size of files served within a specific period of time. This is not a very accurate way to do it. The best way to do it is by server using a switch that supports SNMP. Then you can use MRTG to graph stats for each port (server).

Many control panels add bandwidth monitoring, I decided not to add bandwidth monitoring to a control panel I have been working on because there is no accurate way to do it.

jkca
03-19-2002, 03:08 PM
Analog can do this fairly easily, it works both NT and Unix, however you need to keep in mind that you need to parse through 3 set of logs to get an accurate picture, of course the HTTP and FTP logs, but also there are some sneaky people out there who access their website via IP, which you then have to parse out of the system log an accounts stats by pathname

ziki
03-19-2002, 06:21 PM
Try this apache module http://www.snert.com/Software/mod_watch/

Neo3Net
03-19-2002, 11:44 PM
Check Out Web.CP I think they have a BW measuring script in there.

http://webcp.can-host.com

:)

jmcmike
03-20-2002, 12:04 AM
If you're looking to limit the BW usage by a particular set of files...

I wrote a download script in Perl some time ago that adds the bytes of every download to a running total and denies the download if your threshold is exceeded.

Combine this with referral protection and you've got leech protection with badnwidth limits.

PM me if this is what you're looking for.

important
03-20-2002, 04:30 AM
Originally posted by jkca
Analog can do this fairly easily, it works both NT and Unix, however you need to keep in mind that you need to parse through 3 set of logs to get an accurate picture, of course the HTTP and FTP logs, but also there are some sneaky people out there who access their website via IP, which you then have to parse out of the system log an accounts stats by pathname
Hum, where i can get analog ?

jkca
03-20-2002, 11:01 AM
Take a look at http://www.analog.cx/

important
03-20-2002, 05:59 PM
thanks, analog is a good one, probably rewriting of script is required to suit my needs :)