Tracking bandwidth/usage per domain/client

I currently use a node with Ubuntu 10.04 with LAMP. I maintain the server for a number of clients and would like to be able to gauge the bandwidth each client uses, to determine what payment plan they should be on for their hosting fees.

I assume a lot of the 'processes' for client's will be the same because they all operate from a centralized CMS also running on the server.

I have searched around but unfortunately feel lost seeing I am still learning the networking ropes.

Any help is much appreciated,

Cheers

3 Replies

you could get their web usage from the apache logs, one of the stats packages (I use awstats) can get that for you. if that's the vast majority of the traffic, it may be sufficient.

Thanks glg, I will look into awstats.

I noticed that the logs seem to be a pretty good quick representation of the request loads, seeing they are appended whenever a file is requested.

While on the topic, is there an issue with log files becoming extremely large? Should I be clearing/deleting them at a regular interval?

Typically, a utility like logrotate is used to keep your logs pruned. It does a pretty good job of rotating them on a regular interval and compressing the old ones.

There's a library article on it here.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct