Sys Admins

A group for network and system administrators.

Measuring Bandwidth Usage

Anyone know how to best track bandwidth usage for a particular directory in a website? I've read that Wireshark can do this. Can anyone point me to instructions on how best to do that and then use a PHP script to read the bandwidth usage daily or monthly?

I also came across an interesting of the top 100 network security tools in case anyone is interested.
Load Previous Replies
  • up

    Truman Leung

    Thanks for your reply, Ken. I finally came to that same conclusion about Wireshark after researching it some more. I'm glad that you confirmed it for me.
  • up

    Josh Kuo

    I haven't tried it myself, but I suspect Google Analytic may be configured/hacked to do what you want. I don't know any free web analytic tools that would track bandwidth usage by directory (recursive?)... There are plenty of free apache log analyzers out there, you might be able to embed in your PHP code some kind of bandwidth usage stat and stick it in the apache log, or plot it to MRTG.

    You _could_ run Wireshark to look at your traffic, you'd see all the HTTP headers and theoretically you can parse our the directory/file that's being hit/accessed... but Wireshark is meant to be a network sniffer, and this would be too inefficient (and resource intensive) to be practical.
  • up

    Kurt Sussman

    You can also use a little script magic on your log file to pull out the date and bytes transferred for the directory in question, then total by day. But a web analytics tool will give you that and more.