|
TWiki Site Tools |
|
You can generate a listing manually, or on an automated schedule, of visits to individual pages, on a per web basis. Compiled as a running total on a monthly basis. Includes totals for Topic Views, Topic Saves, Attachment Uploads, Most Popular Topics with number of views, and Top Contributors showing total of saves and attachment uploads. Previous months are saved. |
|
< < | |
> > | You can create a WebStatistics link using TWikiVariables with %STATISTICSTOPIC%
TWiki also generates overall site usage statistics in Main.SiteStatistics (do not create that page, it is created automatically based on SiteStatisticsTemplate). On a monthly basis, the following items are recorded using system data and TWiki log data across all webs: Number of webs, number of topics, number of attachments, number of topic views, number of topic updates, number of files uploads, data size, pub size, disk use, number of users, number of groups, number of plugins installed compared to total number of plugins available, and the 10 top contributors. |
|
Configuring for automatic operation |
|
< < |
- You can automatically generate usage statistics for all webs. To enable this:
|
> > |
- You can automatically generate usage statistics for the whole site and all webs. To enable this:
|
|
-
- Make sure variable
{Log}{view} , {Log}{save} and {Log}{upload} are set in configure. This will generate log file entries (see below).
|
|
< < |
-
- The WebStatistics topic must be present in all webs where you want to have statistics. You can use the topic in the Main web as a template.
- Call the
twiki/bin/statistics script from a cron job, once a day is recommended. This will update the WebStatistics topics in all webs.
- Attention: The script must run as the same user as the CGI scripts are running, which is user
nobody on many systems. Example crontab entry: 0 0 * * * (cd /path/to/twiki/bin; ./statistics >/dev/null 2>&1)
|
> > |
-
- Call the
twiki/bin/statistics script from a cron job - once a day is recommended. This will update the SiteStatistics and the WebStatistics topics in all webs.
- Attention: The script must run as the same user as the CGI scripts are running, such as user
nobody or www-data . Example crontab entry: 0 0 * * * (cd /path/to/twiki/bin; ./statistics >/dev/null 2>&1)
|
|
-
- There is a workaround in case you can't run the script as user
nobody : Run the utility twiki/tools/geturl.pl in your cron job and specify the URL of the twiki/bin/statistics script as a parameter. Example: 0 0 * * * (cd /path/to/twiki/tools; ./geturl.pl mydomain.com /urlpath/to/twiki/bin/statistics >/dev/null 2>&1)
- NOTE:
geturl.pl will do a TWiki CGI request as the TWikiGuest user, so if you use this workaround, the WebStatistics topics you are updating will have to be writable by TWikiGuest.
When running from the command line or a cron job, you can pass parameters to the script like this: |
|
< < | ./statistics -logdate 200605 -webs TWiki,Sandbox |
> > | cd twiki/bin; ./statistics -logdate 2011-05 -webs TWiki,Sandbox |
|
Generating statistics manually by URL |
|
< < |
- The
twiki/bin/statistics script can also be executed as a CGI script, just enter the URL in your browser. Examples:
|
> > |
- The
twiki/bin/statistics script can also be executed as a CGI script - just enter the URL in your browser. Examples:
|
|
-
- Update current month for all webs you have access to:
/twiki_ict/do/statistics
- Update current month for Main web only:
/twiki_ict/do/statistics/Main
|
|
< < |
-
- Update Mar 2025 for Main web:
/twiki_ict/do/statistics/Main?logdate=202503
- Update Mar 2025 for the ProjectX, ProjectY and ProjectZ webs:
/twiki_ict/do/statistics?logdate=202503;webs=ProjectX,ProjectY,ProjectZ
|
> > |
-
- Update Mar 2025 for Main web:
/twiki_ict/do/statistics/Main?logdate=2025-03
- Update Mar 2025 for the ProjectX, ProjectY and ProjectZ webs:
/twiki_ict/do/statistics?logdate=2025-03;webs=ProjectX,ProjectY,ProjectZ
|
|
Log Files |
|
- TWikiAccessControl describes how to restrict read and write access to topics and webs, by users and groups
- SitePermissions lists the permissions settings of the webs on this TWiki site
|
|
> > | Backup and Restore
TWiki has a solution to backup, restore and upgrade TWiki sites. It can be used via browser and on the command line. The BackupRestorePlugin is pre-installed in TWiki-5.1 and later releases; it can be installed in older TWiki releases as low as TWiki-2001-09-01 (Athens Release) to easily create a backup that can be restored on a new TWiki release. This offers an easy upgrade path for TWiki. See also TWikiUpgradeGuide. |
| Help with crontab
The crontab command is used to schedule commands to be executed periodically. |