PDA

View Full Version : Bandwidth usage monitoring


jmstacey
12-27-03, 03:32 PM
I've searched the forums and google for hours but haven't found anything that will do what I want

All I want is a way to monitor the bandwidth usage of my users and store it say in a mysqldb so I could make my own interface to it. I would prefer that it be free to..

I would greatly appreciate any help
Thanks

-Jon-

brevig
12-28-03, 04:55 AM
Do you have root on the server?

If so, you can cause the server to log all accesses to a central log file, in addition to the individual logs in your customer directories. Then, you can either us PHP to parse the log file on a regular basis and input into a MySQL table, or you could use MySQL's input feature and a cron job to call a PHP script. MySQL can actually parse it directly, if you format your logs correctly.

For more information, reference 3.8 of the manual:

http://www.mysql.com/doc/en/Apache.html

Richard

jmstacey
12-28-03, 08:49 AM
Yes I do have root.
I forgot to mention in my first post, the server is running the latest version of slackware.

That sounds sort of what I've been doing just without the mysql db. I've been having apache ouput the logs to a central location and then to users directories and having webalizer process the central logs every 24 hours so I could check for usage. Slow and uneffecient it still worked, but I want to also include ftp...

I'm new to linux, so how would I set the server up to log everything in a central location?


-Jon-