• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

traffic statistics are not generated automatically

S

sebhen

Guest
Hello,

my Plesk statistics and the amount of used traffic is not generated automatically on my Plesk 9.2.2 installation.

The script /etc/cron.daily/50plesk-daily exists and the statistics are generated accurately if I manually call the script. It seems that Cron didn't call it automatically. Plesk is installed on Ubuntu 8.04.3 LTS inside a virtuozzo container.

Any help is appreciated!

Sebastian
 
Hello,

Can you provide us with the results of the following commands:

# cat /etc/crontab

# cat /etc/cron.daily/50plesk-daily

# ps aux | grep crond
 
cat /etc/crontab
Code:
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user  command
27 * * * * root cd / && run-parts --report /etc/cron.hourly
31 5 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
26 3 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
23 0 25 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#

cat /etc/cron.daily/50plesk-daily

Code:
#!/bin/sh

# install_statistics
/opt/psa/bin/sw-engine-pleskrun /opt/psa/admin/plib/DailyMaintainance/script.php >/dev/null 2>&1

# install_mysqldump
/opt/psa/bin/mysqldump.sh >/dev/null 2>&1

# install_autoreport daily
/opt/psa/admin/bin/php /opt/psa/admin/plib/report/autoreport.php --auto daily >/dev/null 2>&1

ps aux | grep crond
Code:
root     17740  0.0  0.0   5160   836 pts/0    S+   13:03   0:00 grep crond

It looks like cron isn't coming up during system boot. I'll try to figure out why. If I do "/etc/init.d/cron start", cron starts properly. A link to "/etc/init.d/cron" in "/etc/rc1.d" is also set. Otherwise I have to start cron manually after each reboot. I think this is the cause why the statistics aren't generated automatically.

Thank you very much for pointing me in the right direction!

Sebastian
 
Same issue here. I solved it making a cronjob at night running /opt/psa/admin/sbin/statistics >/dev/null 2>&1.

But that's actually not a real solution. So I ran /opt/psa/bin/sw-engine-pleskrun /opt/psa/admin/plib/DailyMaintainance/script.php manually instead through 50plesk-daily.

This results in the following error:

PHP Warning: file(/etc/psa/psa.conf): failed to open stream: Permission denied in /opt/psa/admin/plib/class.Conf.php3 on line 28
Unable to read Control Panel configuration file:

Apparently the script cannot access the psa.conf... Searching the forum revealed probably the /etc/psa directory hasn't got the right permissions. Changed the dir to 755 of the directory, not the file! This solved the above warning.

And this change also probably solved this error in the user.log (/var/log):
Feb 21 15:11:20 h1603680 spam_hook[16116]: unable to open configuration file /etc/psa/psa.conf: Permission denied
 
Back
Top