Difference: TWikiSiteTools (17 vs. 18)

Revision 182011-08-13 - TWikiContributor

Line: 1 to 1
 

TWiki Site Tools

Line: 64 to 64
  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.
Changed:
<
<
>
>
TIP 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

Changed:
<
<
  • 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).
Changed:
<
<
    • 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:

Changed:
<
<
./statistics -logdate 200605 -webs TWiki,Sandbox
>
>
cd twiki/bin; ./statistics -logdate 2011-05 -webs TWiki,Sandbox
 

Generating statistics manually by URL

Changed:
<
<
  • 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/bin/statistics
    • Update current month for Main web only:
      /twiki/bin/statistics/Main
Changed:
<
<
    • Update Mar 2024 for Main web:
      /twiki/bin/statistics/Main?logdate=202403
    • Update Mar 2024 for the ProjectX, ProjectY and ProjectZ webs:
      /twiki/bin/statistics?logdate=202403;webs=ProjectX,ProjectY,ProjectZ
>
>
    • Update Mar 2024 for Main web:
      /twiki/bin/statistics/Main?logdate=2024-03
    • Update Mar 2024 for the ProjectX, ProjectY and ProjectZ webs:
      /twiki/bin/statistics?logdate=2024-03;webs=ProjectX,ProjectY,ProjectZ
 

Log Files

Line: 160 to 161
 
  • 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
Added:
>
>

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.

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.TWikiSiteTools.