• Article for your preferred language does not exist. Below is international version of the article.
Traductions disponibles pour l'article:

[HOWTO] How do I recalculate AWstats statistics from logs for previous months?

  • Parallels Plesk Panel for Linux/Unix

Usage instructions

Run the below commands to download, unzip, make executable, and execute the script on your server:

    # wget
    # unzip
    # chmod u+x
    # ./

If no arguments are supplied, the script will display "Help". See more information on how the script works below.


For each specified domain (or for all domains if the -A option is used), learn the log files' start date. Remove the AWstats data files for months covered by the log file and rebuild them with information from the logs. Then, build static pages with a statistics summary for every month covered by the log files.

Alternatively, if the -F option is used, all data files are removed and new files are generated using information from the log files.


# ./

Rebuild AWstats static pages from available log files.

Usage: ./ [options] [<domains...>]

        Process all domains. If this option is not specified, then list of
        domains to process must be provided.

        Remove contents of webstat/ and webstat-ssl/ directories before
        rebuilding statistics pages (originals are saved with numeric
        suffix). Statistics will be rebuilt from logs only, only for
        period covered by log files. If this parameter is not used, then
        statistics is recalculated beginning on the month on which log files
        start (if log starts in the middle of the month, then statistics
        for first half of the month will not be present.)

        This message.

Home page: <>

Example output

For each processed domain, the script reports the following:

Saving: webstat* --> webstat*.9
Logs begin on Oct 27 2012
access_log* (new/old/corrupted): 9/0/0
access_ssl_log* (new/old/corrupted): 71/0/0
Rebuilding static pages: 2012-10 2012-11 2012-12 2013-01 2013-02

As you can see, it saves the original directories with a numeric suffix (the suffix is increased if the destination directory already exists). As a result, it is possible to roll-back to a previous version if needed.

Known issues:

#117731 script fails with error: "ERROR: failed to merge access_log"

Mots de recherche :

Unable to parse pending domains traffic line

statistics wrong calculated with plesk 11.5

awstats and domain stats are not in sync

Web statistics won't work

domain statistics awstats not similar

Web-statistics in Plesk

prmpt password

incorrect stats

incorrect stats for the last day of the month

problema http traffic statistic


Pièces jointes:

56797cefb1efc9130f7c48a7d1db0f0c 49af2da0f2dd4c81e962790bbbd0c2b4 5d735c0e028ee5b991e4fb80d34fb87f

Cet article vous-a-t-il aidé ?
Indiquez ce que nous pouvons améliorer.
Oui Non
Virtualisation de desktops
- Parallels Desktop 9 pour Mac
- Pour les entreprises
- Parallels Desktop pour Mac Enterprise Edition
- Parallels Management-Mac pour Microsoft SCCM
- Tous les Produits de virtualisation de desktops >>
Plates-formes d'automatisation cloud et d'hébergement
Parallels Plesk Panel Suite
- Parallels Plesk Panel
- Parallels Plesk Automation
- Parallels Web Presence Builder
Parallels Automation Suite
- Parallels Automation
- Parallels Automation for Cloud Infrastructure
- Parallels Business Automation Standard
Parallels Virtualization Suite
- Parallels Cloud Server
- Parallels Virtuozzo Containers
- Parallels Virtual Automation
Services & Ressources
- Services Cloud Acceleration
- Services professionnels
- Services d'assistance
- Formation & Certification