How can I fix any statistics generation problems?

Overview

This article outlines the procedures for diagnosing and resolving issues that prevent Warden statistics from generating correctly. Statistical data relies on a scheduled cron task and accurate server time synchronization. Follow the steps below to verify configurations, restore missing entries, or reset statistical records.

Prerequisites

  • Root or administrative access to the server via SSH.
  • Familiarity with command-line text editors (e.g., vi, nano).

Verify and Restore the Warden Crontab Entry

The Warden module requires a specific cron entry to update statistics on a scheduled basis. If this entry is missing, statistical data will not populate.

  1. Check for the existing crontab entry: Execute the following command to verify if the task is configured:
    # crontab -u psaadm -l | grep warden
  2. Verify expected output: A correctly configured system will return the following line:
    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'
  3. Add the missing entry: If the command returns no output, edit the crontab for the psaadm user:
    # crontab -u psaadm -e
    Insert the appropriate line based on your operating system. Preserve the exact spacing and paths provided below:
    // edit the psaadm cron entry and enter the line depending on your OS
    
    // AlmaLinux/CloudLinux/RHEL
    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'

Correct Server Date, Time, and Timezone

Accurate system time is critical for statistics generation. Incorrect timezone or clock settings will cause data discrepancies or prevent updates entirely.

  1. Resolve time configuration issues: Follow the official documentation to correct your server's date, time, and timezone settings: Fix Incorrect Date and Time Display.
  2. Reset and regenerate statistics: After verifying the system clock, execute the following command to clear outdated statistical data and reset the update timestamp:
    plesk db -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';"

Troubleshooting & Common Issues

  • Delayed updates: Statistics regeneration occurs automatically during the next scheduled cron execution (approximately every 15 minutes). Allow up to 20 minutes for data to reflect after applying fixes.
  • statistics
  • 0 användare blev hjälpta av detta svar
Hjälpte svaret dig?

Relaterade artiklar

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

Overview This article provides resolution steps for the MariaDB connection error Host...

How can I fix the error: Parse error at /etc/clamav/clamd.conf Unknown option ScanImage?

Overview The clamav-daemon.service may fail to start due to unrecognized configuration...

How can I fix the error: The domain limit of this license key has been reached?

Overview The Admin and Pro editions of Danami products enforce a maximum domain limit within the...

After upgrading from Centos 7 to AlmaLinux 8 Amavis is treating mail with low scores as spam. How can I fix this?

Overview Following an upgrade from CentOS 7 to AlmaLinux 8, Amavis may incorrectly classify...