Total Bandwidth Usage

  • Frostbyt3
  • Graduate
  • Graduate
  • User avatar
  • Posts: 221
  • Loc: Corpus Christi, TX

Post 3+ Months Ago

I don't really know where to start for this at all but I guess I'm looking for something that is actual software mixed with PHP.

What I'm looking for is something that will tell me total bandwidth usage on my home server.

I've been googling and looking around and all I can come across are programs/scripts that tell me the current Up/Down rates as I'm downloading or uploading.

What I WANT is something that I can put at the bottom of my pages in apache that says for example...

Total Downloaded : 200,000 mb | Total Uploaded : 160,000 mb

So that I can know my TOTAL CURRENT bandwidth usage from JUST my server.

Thanks

- Dave
  • Frostbyt3
  • Graduate
  • Graduate
  • User avatar
  • Posts: 221
  • Loc: Corpus Christi, TX

Post 3+ Months Ago

I found something that works good..

AnalogX Netstat Live

But if anyone knows something like this that can be used in PHP, please let me know.

Thanks
:D

-Dave
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

I would start by looking into Apaches' mod_logio to add the number of bytes sent/received when logging and thinking about a CustomLog format I could use to break down the IO usage by browser/IP/OS/etc.
http://httpd.apache.org/docs/2.0/mod/mod_logio.html

Once I had my logging in order I would write a script to parse the log files and produce over-all statistics.

Then I would setup a CRON job to run the script every 5 minutes or so and output the HTML I want to display to an XML/HTML file I could include with PHP at the bottom of pages.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 52 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.