How to recalculate statistics in Plesk

- by

Plesk-LogoPlesk recalculates all usage statistics once every day as part of a daily maintenance script. Sometimes however you’ve made a change and would like to see statistics updated immediately rather than “sometime tomorrow”.

The solution: run the statistics recalculations script manually.

On CentOS the path to the file is /usr/local/psa/admin/sbin/statistics. When used on its own all statistics are recalculated on the spot.

You can use the script with options too, for example to update a single domain only. Use the –help switch to see the full array of options:

/usr/local/psa/admin/sbin/statistics --help

Usage: /usr/local/psa/admin/sbin/statistics [ options ]

--calculate-all               Calculate statistics for all domains
--calculate-one               Calculate statistics for 
--domain-name|-d      
--calculate-list              Calculate statistics for listed domains
--generate-all-webstat        Generate web-statistics pages for all domains
--generate-domain-webstat     Generate web-statistics pages for 
--domain-names|-n     List of domains, comma separated
--domain-ids|-i       List of domains IDs, comma separated
--process-domains|-p  Calculate statistics for 
--all                         Calculate all aspects of statistics
--antivirus                   Calculate antivirus and antispam statistics
--no-webstat                  Do not generate web-statistics pages (always set for PPA mode or Windows)
--help|-h                     display this help and exit

If no options specified - calculate statistics for all domains

Depending on the amount of domains you have this can take a minute or two. If you’re only interested in refreshing statistics for a single domain you can use this syntax:

/usr/local/psa/admin/sbin/statistics --calculate-one -d yourdomain.com

Have fun πŸ˜‰



If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site witout any pesky ads! More details here.

Add your voice!

This site uses Akismet to reduce spam. Learn how your comment data is processed.