Skip to content
  • Contact us: +34 944 58 06 58
  • Plesk Partner Program
  • Plesk Lifecycle Policy
  • Blog
  • Contact us
  • Plesk 360
  • Contact us: +34 944 58 06 58
  • Plesk Partner Program
  • Plesk Lifecycle Policy
  • Blog
  • Contact us
  • Plesk 360
  • Solutions
    By Role
    • Developers
    • Content Managers
    • Digital Agencies
    • IT Admins
    • Web Hosters
    • Hyperscalers
    • Developers
    • Content Managers
    • Digital Agencies
    • IT Admins
    • Web Hosters
    • Hyperscalers
    By Edition
    • Web Admin Edition
    • Web Pro Edition
    • Web Host Edition
    • Business & Collaboration
    • Plesk WP Edition
    • Web Admin Edition
    • Web Pro Edition
    • Web Host Edition
    • Business & Collaboration
    • Plesk WP Edition
    By Cloud
    • Amazon Web Services
    • Microsoft Azure
    • Alibaba Cloud
    • GCP Marketplace
    • Vultr
    • DigitalOcean
    • Linode
    • UpCloud
    • Amazon Web Services
    • Microsoft Azure
    • Alibaba Cloud
    • GCP Marketplace
    • Vultr
    • DigitalOcean
    • Linode
    • UpCloud
    Partner Program
    Exclusive discounts, benefits and exposure to take your business to the next level
    Become a partner
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    Explore Features
    • Everyone
    • Admins & Web Hosters
    • Developers
    • Designers & Agencies
    • Plesk Features
    • Everyone
    • Admins & Web Hosters
    • Developers
    • Designers & Agencies
    • Plesk Features
    Key Topics
    • SocialBee
    • WP Toolkit
    • Sitejet Builder
    • SEO Toolkit
    • Joomla! Toolkit
    • Plesk Premium Email
    • Plesk Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder
    • SEO Toolkit
    • Joomla! Toolkit
    • Plesk Premium Email
    • Plesk Email Security
    Feature Packs
    • Business & Collaboration
    • WP Pack
    • Hosting Pack
    • Power Pack
    • Language Pack
    • Business & Collaboration
    • WP Pack
    • Hosting Pack
    • Power Pack
    • Language Pack
    Featured Extension
    SocialBee
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • Extension
  • Pricing
  • Extensions
  • Help Center
  • More
    • Careers
    • Events
    • Plesk University
  • FREE TRIAL
  • Solutions
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder
      • SEO Toolkit
      • Joomla! Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • SocialBee
  • Pricing
  • Extensions
  • Help center
  • More
    • Careers
    • Events
    • Plesk University
    • Blog
    • Plesk Partner Program
    • Contact Us
  • FREE TRIAL
  • Solutions
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder
      • SEO Toolkit
      • Joomla! Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • SocialBee
  • Pricing
  • Extensions
  • Help center
  • More
    • Careers
    • Events
    • Plesk University
    • Blog
    • Plesk Partner Program
    • Contact Us
  • FREE TRIAL

Knowledge Base

How to recalculate Plesk statistics starting from particular date on Windows

 
cachedatabasednsdns statisticsdomains

Question

How to recalculate statistics using old IIS log files starting from a particular date?

Answer

When the
statistics.exe
utility is run, either manually or during daily maintenance, it performs the following actions to calculate statistics for each domain:

  1. Parse IIS log files for the domain and only select non-processed records.

  2. Merge the selected records with the records from the default website log file.

  3. Process the resulting log file with the native statistics backend (AWStats or Webalizer).

Follow the steps below to recalculate statistics from a given date to the current date:

  1. Ensure Log Rotation is enabled and configured
  2. Go to IIS > Sites > example.com > Logging and enable all fields for W3C logging: 

    mceclip0.png

  3. Verify that domain log files are not compressed and contain data:

    Use this command to find the log's location: 

    C:> "%plesk_dir%"adminbin64websrvmng.exe --get-vhost-log-dir --vhost-name=example.com
    C:Inetpubvhostsexample.comlogsW3SVC11

    Unzip and place all the log files that should be processed by statistics into the folder above. Make sure they have the
    .log
    extension. It also may be a good idea to merge them all into a single
    .log
    file.

  4. Change the value of
    LastHttpStatisticsRun
    for the domain in the registry:

    Retrieve the domain ID from Plesk database:

    C:> "%plesk_bin%"dbclient.exe --direct-sql --sql="SELECT id, name FROM domains WHERE name='example.com'"
    id name
    40 example.com

    Change the value of this registry key to the date from which statistics will be recalculated:

    HKEY_LOCAL_MACHINESOFTWAREWow6432NodePLESKPSA ConfigConfigStatisticsDomainIds40LastHttpStatisticsRun

    (where "40" is the domain ID obtained above from the
    psa
    database)

    If there is no
    LastHttpStatisticsRun
    in the registry, all available log files will be recalculated.

  5. If it is needed to recalculate statistics for a part of the current month, edit this file (in this example, the current month is November 2019):

    C:inetpubvhostsexample.com.pleskstatisticsexample.comwebstatawstats112019.example.com.txt

    Remove the lines starting with the following keywords from the file above:


    LastLine


    LastTime


    LastUpdate

  6. If it is needed to recalculate statistics for one or more months, delete the AWStats databases from the very first month for which the statistics need to be recalculated. For example, to recalculate statistics for September 2019 (and it is now November 2019), delete the following files:

    C:inetpubvhostsexample.com.pleskstatisticsexample.comwebstatawstats092019.example.com.txt
    C:inetpubvhostsexample.com.pleskstatisticsexample.comwebstatawstats102019.example.com.txt
    C:inetpubvhostsexample.com.pleskstatisticsexample.comwebstatawstats112019.example.com.txt

    If this step is forgotten, AWStats will ignore all log files as if they only contained old records.

  7. Remove the DNS cache file:

    C:inetpubvhostsexample.com.pleskstatisticsexample.comwebstatdnscachelastupdate.example.com.txt

  8. Calculate the statistics:

    C:> "%plesk_bin%"statistics.exe --calculate-one --domain-name=example.com

    Alternatively, launch the Plesk Daily Maintenance scheduled task using the Windows Schedule tasks snap-in.

  9. If the last step did not result in the statistics update, execute the below command:

    C:> "%plesk_bin%"statistics.exe --generate-domain-webstat --domain-name=example.com

  10. For cases when
    u_extend**.log
    contains full statistics information, but
    web***.log
    does not:

    - Check…

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

DNS_PROBE_FINISHED_NXDOMAIN: What Is It And How To Fix The Problem

Read More »

Exploring Plesk’s Added Value Solutions So Far in 2023

Read More »

Unveiling Sitejet Builder: The Perfect Match for Your Effortless Website Creation Needs

Read More »
Knowledge Base

How to bulk update the IP address in multiple DNS A records?

Read More »

How to add/change a DNS NS record in Plesk

Read More »

How to remove domain DNS record in Plesk?

Read More »

How to disable web statistics in Plesk?

Read More »

Hosting Wiki

  • Django
  • CacheFly
  • Google Cloud CDN
  • AMP
  • Windows Server
  • MongoDB
  • Domain
  • Plesk
  • SQL database
  • NoSQL Database
  • Static DNS
  • DNS Server
  • DNS Forwarding
  • Reverse DNS

Industry
Partners

industry-partner_ALIBABA
industry-partner_GOOGLEPARTNER
industry-partner_MICROSOFT
industry-partner_REDHAT-r2
industry-partner_ALIBABA
industry-partner_AUTOMATTIC
industry-partner_AWS
industry-partner_DIGITALOCEAN
industry-partner_SCALEWAY
Follow us:
Facebook Twitter Linkedin Youtube Github

COMPANY

About Plesk
Our Brand
Legal
Careers
Impressum

PRODUCT

Pricing 
Extensions
What’s new

KNOWLEDGE BASE

Documentation
Help Center
Migrate to Plesk
Contact Us
Hosting Wiki
Preview releases

PROGRAMS

Contributor Program NEW
Partner Program
Affiliate ProgramNEW

COMMUNITY

Blog
Forums 
Plesk University

First defaul

Company

About Plesk
Our Brand
Legal
Careers
Impressum

PRODUCT

Pricing 
Extensions
What’s new

KNOWLEDGE BASE​

Documentation
Help Center
Migrate to Plesk
Contact Us
Hosting Wiki
Preview releases

PROGRAMS​

Contributor Program NEW
Partner Program
Affiliate ProgramNEW

COMMUNITY​

Blog
Forums
Plesk University

Follow us:
Facebook Twitter Linkedin Youtube Github

© 2025 WebPros International GmbH. All rights reserved. Plesk and the Plesk logo are trademarks of WebPros International GmbH.

Managed with love with Plesk WP Toolkit