6 Answers
6

If you're after network stats, ntop provides a very nice interface for charting throughput, host connections, per-host network traffic, etc. I use it on a few routers and it introduces little load. It uses libpcap, so you can even tailor the filter if you want.

It doesn't monitor CPU usage, just network usage, but otherwise it sounds like it would fit most of your needs.

If you're looking for something you can install as an end-user, more akin to an AWstats type of setup, that's going to be a little more difficult as you'd have to constantly churn through logs. I do recall some PHP scripts that worked in conjunction with configuring Apache to pipe its access logs to a Perl or Python script that wrote them into a MySQL database at one point, but that might be more work than you're wanting and/or overkill.

What sort of stats are you looking to capture? Bytes per second? Number of 200/300/400/500 responses per second? Unique IPs per second?

This link to the Apache traffic stats can help you capture some of that data and get it into ganglia. Assuming you have ganglia installed (and you should.) I'm sure you can figure out how to modify this setup for many other things you'd like to capture.