Web Hosting Talk







View Full Version : Couple newbie questions about logging


hbouma
05-08-2002, 03:22 PM
Hi,

I was wondering how everyone tracks the cpu load on their machines. (This might be a silly question because something already does this). But how does everyone here track their cpu loads on a daily basis for each server they have?

Also, how does everyone manage their log files for apache, ftp, etc. Do you have a cron job that cleans them out each day or what do you do to keep them from growing too large? Do you zip them up and download them for tracking purposes?

Thanks for your input!

Hal

bofh
05-09-2002, 01:01 AM
Originally posted by hbouma
Hi,

I was wondering how everyone tracks the cpu load on their machines. (This might be a silly question because something already does this). But how does everyone here track their cpu loads on a daily basis for each server they have?

Also, how does everyone manage their log files for apache, ftp, etc. Do you have a cron job that cleans them out each day or what do you do to keep them from growing too large? Do you zip them up and download them for tracking purposes?

Hal

There are literally tons of programs that will do this. There are
lots of ways you can go about it as well. If it's a Unix box you
can just log in via ssh and run 'top'. This will give you the servers
load average in real time. You can use web based applications
that display load on the box such as phpsysinfo or MRTG. MRTG
works well on both Unix and Windows platforms and will monitor
just about anything you want.

As for rotating your apache web logs: Apache comes with a binary
called 'logrotate' which can be used to rotate your web logs every
x amount of days. This should be located in your /usr/local/apache/bin directory (or wherever you decided to
install apache).