1 rizwank 1.1 %META:TOPICINFO{author="MikeMannix" date="999329234" format="1.0" version="1.1"}%
2 %TOC%
3 %STARTINCLUDE%
4
5 ---## Site Usage Statistics
6
7 * You can automatically generate usage statistics for all webs. To enable this:
8 * Make sure variable =$doLogTopicView, $doLogTopicSave and $doLogTopicUpload= in =wikicfg.pm= are set. This will generate log entries in file =twiki/data/log<date>.txt= .
9 * Topic WebStatistics must be present in all webs where you want to have statistics. You can use the topic in the Main web as a template.
10 * Call the =twiki/bin/statistics= script from a cron job, once a day is recommended. This will update the WebStatistics topics in all webs.
11 * __Attention:__ The script must run as the same user as the CGI scripts are running, which is user =nobody= on most systems. Example crontab entry: <br> =0 0 * * * (cd /path/to/TWiki/bin; ./statistics >/dev/null 2>&1)=
12 * There is a workaround in case you can't run the script as user =nobody= : Run the utility =twiki/bin/geturl= in your cron job and specify the URL of the =twiki/bin/statistics= script as a parameter. Example: <br> =0 0 * * * (cd /path/to/TWiki/bin; ./geturl mydomain.com /urlpath/to/TWiki/bin/statistics >/dev/null 2>&1)=
13 * The =twiki/bin/statistics= script can also be executed as a CGI script, just enter the URL in your browser. Examples:
14 * Update current month for all webs: <br> =http://mydomain.com/twiki/bin/statistics=
15 * Update current month for Main web only: <br> =http://mydomain.com/twiki/bin/statistics/Main=
16 * Update January 2000 for Main web: <br> =http://mydomain.com/twiki/bin/statistics/Main?logdate=200001=
17
18 -- MikeMannix - 01 Sep 2001
19
20 %META:TOPICMOVED{by="MikeMannix" date="999329194" from="TWiki.GenerateSiteStatistics" to="TWiki.SiteUsageStatistics"}%
|