How can I fix any statistics generation problems?

Missing the Warden Crontab Entry

There is a crontab entry that will update Warden statistics every 15 minutes. You can check that it isn't missing using the command:

# crontab -u psaadm -l | grep warden
0,9,19,29,39,49,59      *       *       *       *       /usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/warden/scripts/cron.php'

To re-add the entry if it is missing use the command and add the entry using depending on your OS:

// edit the psaadm cron entry and enter the line depending on your OS
# crontab -u psaadm -e

// AlmaLinux/Centos/CloudLinux/RockyLinux
0,9,19,29,39,49,59      *       *       *       *       /usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/warden/scripts/cron.php'

// Debian/Ubuntu
0,9,19,29,39,49,59      *       *       *       *       /opt/psa/admin/bin/php -dauto_prepend_file=sdk.php '/opt/psa/admin/plib/modules/warden/scripts/cron.php'

Once this is completed the statistics will be regenerated from the messages in the message log the next time the statistics task is run (every 15 minutes).

Wrong Timezone or Date and Time

Statistics generation requires that the correct date and time be set properly on your server. You can fix any timezeone or date and time problems here. After you correct any date and time problems on your server you can reset and regenerate the statistics for all domains and mailboxes using the following command:

mysql -u admin -p`cat /etc/psa/.psa.shadow` -s -N -e "use danami_warden; TRUNCATE TABLE statistics; UPDATE config SET config_value='s:19:\"2019-01-01 00:00:00\";' WHERE config_key='last_updated';"

Once this is completed the statistics will be regenerated from the messages in the message log the next time the statistics task is run (every 15 minutes).

  • statistics
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How can I fix the error: Host '127.0.0.1' is not allowed to connect to this MariaDB server?

When looking at the server mail log you see this: Apr 4 11:01:15 alma amavis[3540852]:...

ClamAV will not start. How can I fix the ClamAV error: daily.{c[vl]d,inc} was not met?

ClamAV refuses to start and when viewing the status you see...

How can I fix the error: "milter-reject: END-OF-MESSAGE from..." in the log and found the AV in error (cannot read /etc/clam.d/scan.conf).

Cloudlinux / Imunify360 added their own version of ClamAV to their repo which accidentally...

How can I fix the error: Can't connect to TCP port 10024 on 127.0.0.0 [Address already in use] when trying to start Amavis?

When trying to start Amavis you see this in the mail log: Oct 02 03:20:15 condor3648 systemd[1]:...

How can I fix the error: Can't connect to TCP port 10024 on ::1 [Cannot assign requested address] when trying to start Amavis?

When trying to start Amavis you see this in the mail log: Oct 02 03:20:15 condor3648 systemd[1]:...