Page 1 of 1

Log files

Posted: Fri May 04, 2007 11:02 am
by alex.barylski
I've asked this just recently, but I believe this to be slightly more specific.

I would like to know (how to enable) log files for the following:
1) CPU/RAM usage
2) Bandwidth usage

Obviously the latter is specific to Apache, but I cannot find any logs which indicate bandwidth usage? How (or are there) applications which allow you to setup domain's on a dedicate server and restrict their bandwidth/HDD space (including their mysql, etc)???

Logging CPU on a per web site basis isn't really nessecary (although if PHP has logging which I could use to narrow down which site was highest) that would be killer. :P

Basically I need a way to monitor who is doing what and how much they are consuming on a per web site basis.

Edit: I'm looking into access_log for Apache and it looks very promising. :) However I wonder if there is a way add COOKIE data to that request log? Relying on IP alone isn't the greatest for determining unique hits. Anyone know of a way or think of a workaround?

Cheers :)

Posted: Fri May 04, 2007 3:05 pm
by Chris Corbyn
Badwidth usage:

MRTG (web application)
iptraf (command line tool)

CPU/RAM:

I'm not aware of anything but you could script it yourself easily. Refer to the files at /proc/cpuinfo and /proc/meminfo. These are just text files which give you realtime figures for CPU and RAM usage. There are other tools such as "free", "top" and "uptime" but if you're scripting your own I'd look in /proc for sure :) If you have acpi enabled look at various files in /proc/acpi too (again, just plain text files).

Posted: Mon May 07, 2007 12:46 am
by alex.barylski
Cool, thanks man. :)