Article ID: 127866, created on Dec 25, 2015, last review on Dec 25, 2015

  • Applies to:
  • Plesk 12.0 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux

Symptoms

Web statistics do not work - no statistics are shown for domains.

Information

By design, web statistics are calculated by the /etc/cron.daily/50plesk-webstat script on Apache service nodes on a daily basis. The script writes its results into the /usr/local/psa/var/log/web_statistic_executor.last.log file.

Check the file for possible errors. If it is not up to date, check which cron packages are installed on your server.

Cause

The issue may be caused by errors in the "cron" and "anacron" packages:

~# rpm -qa | grep cron  
cronie-1.4.4-7.el6.i686  
cronie-anacron-1.4.4-7.el6.i686  

And the "cron" was configured for hourly jobs:

~# ll /etc/cron.d/
totale 8
-rw-r--r-- 1 root root 113 19 lug  2011 0hourly
-rw-r--r-- 1 root root 459 18 giu  2012 sa-update

And the "anacron" for daily, weekly and monthly:

~# cat /etc/anacrontab | grep cron
# /etc/anacrontab: configuration file for anacron
# See anacron(8) and anacrontab(5) for details.
1       5       cron.daily              nice run-parts /etc/cron.daily
7       25      cron.weekly             nice run-parts /etc/cron.weekly
@monthly 45     cron.monthly            nice run-parts /etc/cron.monthly

But the "anacron" service does not exist in system:

~# service crond status
crond (pid  635) in running...
~# service anacron status
anacron: unknown service

Resolution

Daily, weekly and monthly tasks should be run from the file /etc/cron.d/dailyjobs.

  1. Move the /etc/cron.hourly/0anacron file away:

    ~# mv /etc/cron.hourly/0anacron ./
    
  2. Create the file /etc/cron.d/dailyjobs with the following strings:

    SHELL=/bin/bash  
    PATH=/sbin:/bin:/usr/sbin:/usr/bin  
    MAILTO=root  
    HOME=/  
    02 4 * * * root [ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.daily  
    22 4 * * 0 root [ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.weekly  
    42 4 1 * * root [ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.monthly
    

a914db3fdc7a53ddcfd1b2db8f5a1b9c 56797cefb1efc9130f7c48a7d1db0f0c 29d1e90fd304f01e6420fbe60f66f838 01bc4c8cf5b7f01f815a7ada004154a2 0a53c5a9ca65a74d37ef5c5eaeb55d7f aea4cd7bfd353ad7a1341a257ad4724a 2a5151f57629129e26ff206d171fbb5f e335d9adf7edffca6a8af8039031a4c7

Email subscription for changes to this article
Save as PDF