www.digitaldaze.com
How do I setup Getstats to send me a report Automatically?

You should set up a cron tab to compute the daily statistics and send you a daily report, a weekly report, and a monthly report automatically.

Additionally, you should "Nuke" the getstats log file at the start of every month to free up disk space on your Virtual Server.

Here is a sample cronfile:

----------------------
58 23 * * *     /usr/local/bin/getstats -d -f | /usr/bin/mail -s "HTTP Daily Stats" stats@yourdomain.com
59 23 * * 7     /usr/local/bin/getstats -w -f | /usr/bin/mail -s "HTTP Weekly Stats" stats@yourdomain.com
01 00 1 * *     /usr/local/bin/getstats -m -f -n | /usr/bin/mail -s "HTTP Monthly Stats" stats@yourdomain.com
----------------------

Store this three line file in your home directory in a file called "cronfile" for example.

then type "crontab cronfile" in your home directory to start cron.

The first line will send a full daily report to stats@yourdomain.com each day at 23:58 (11:58 pm).

The second line will send a full weekly report at the end of each week at 23:59 (11:59 pm).

The third line will send a full monthly report and "nuke" (-n) the log file at 00:01 (12:01 am) on the first day of each month.

The "-f" specifies a full report... If you do not want a full report, you can change the "f" to the proper report you need as outlined in the Virtual Server Administrator's Handbook.

 

[Legal Notice]
http://www.digitaldaze.com