• 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

Statistics not being calculated

Matthew James

Basic Pleskian
Hi everyone,

On Plesk 10.4.4, it seems statistics are no longer being calculated.

I've tried to run the stats manually but it just hangs, no matter which domain I try

/usr/local/psa/admin/sbin/statistics --calculate-one --domain-name=domain.tld

Upon stracing the process, it seems to be doing nothing:

# strace -p 7859
Process 7859 attached - interrupt to quit
read(10,

I seem to have a lot of processes running for statistics_collector:

root 7516 0.0 0.1 63872 2368 pts/2 S 21:52 0:00 /usr/local/psa/admin/bin/statistics_collector
root 17999 0.0 0.0 64744 1200 ? SN Nov16 0:00 /usr/local/psa/admin/bin/statistics_collector
root 19515 0.0 0.0 63872 940 ? S 03:24 0:00 /usr/local/psa/admin/bin/statistics_collector
root 20253 0.0 0.0 63872 940 ? S 03:27 0:00 /usr/local/psa/admin/bin/statistics_collector
root 22001 0.0 0.0 63872 940 ? S 03:31 0:00 /usr/local/psa/admin/bin/statistics_collector
root 22096 0.0 0.0 63872 940 ? S 03:32 0:00 /usr/local/psa/admin/bin/statistics_collector
root 22122 0.0 0.0 63872 940 ? S 03:32 0:00 /usr/local/psa/admin/bin/statistics_collector
root 25550 0.0 0.0 63872 940 ? S 03:45 0:00 /usr/local/psa/admin/bin/statistics_collector

Stracing one of these gives:

# strace -p 17999
Process 17999 attached - interrupt to quit
write(2, "statistics_collector: ", 22 <unfinished ...>

And also the following:

root 30855 0.0 0.0 193828 1852 ? S 04:03 0:00 /usr/bin/sw-engine -c /usr/local/psa/admin/conf/php.ini /usr/local/psa/admin/sbin/statistics
root 17994 0.0 0.0 249008 1856 ? SN Nov16 0:00 /usr/bin/sw-engine -c /usr/local/psa/admin/conf/php.ini /usr/local/psa/admin/sbin/statistics

stracing one of these gives:

# strace -p 30855
Process 30855 attached - interrupt to quit
write(15, ": : :std_fwd:8090721c-5b59-4490-"..., 8192

So it seems something is amiss here, I've tried running the DailyMaintainance.php script too, but this also just hangs.

Is anyone else having the same problem?

Thanks
Matt
 
It is calculated from the error_logs and access_log files are you sure they have proper permissions set ?
 
Hi,

Well they have the same ownership and permissions as the Plesk server they were migrated from:

-rw-r--r-- 1 root root 27170 Nov 17 16:55 access_log
-rw-r--r-- 1 root root 73 Nov 11 21:10 access_ssl_log
-rw-r--r-- 1 root root 255886 Nov 17 22:12 error_log

So I think they should be ok.

Thanks
Matt
 
Hi,

I think it might be working now actually, the script just doesn't give any output for quite a while! Although isn't there supposed to be a cron setup to run the statistics? I can't see one anywhere under any user.

Thanks
Matt
 
Last edited:
Try strace with -f. If you really want to collect statistics about where it is spending it's time, consider oprofile or perf.

Also try to trun top -d2 command in another console and monitor the load. It seems its waiting for another thread to complete.
 
Oh I did'nt check your previous response to the thread - Nice to hear it started working ofcourse not by itself.
 
Hi,

Yes it did seem to work in the end - it just took HOURS to run it. It hasn't updated any of the disk space usage in Plesk though, that just shows as 0B for everybody.

Also, where is the cron that runs the stats? I'm sure in previous versions it was just a cron setup under the root user, but that doesn't seem to be the case any longer.

Thanks
Matt
 
I have exactly the same issue since my update to plesk 10.4.4 I tried to launch calculate on one domaine.
in ps- aux I see well:
root 27966 0.0 0.0 3952 600 ? Ss Nov19 0:00 /bin/sh -c test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
root 27967 0.0 0.0 3852 584 ? S Nov19 0:00 run-parts --report /etc/cron.daily
root 27968 0.0 0.0 3952 588 ? S Nov19 0:00 /bin/sh /etc/cron.daily/50plesk-daily
root 27969 0.0 0.2 233784 47368 ? S Nov19 0:00 /usr/bin/sw-engine -c /opt/psa/admin/conf/php.ini /opt/psa/admin/plib/DailyMaintainance/script.php
root 28059 0.0 0.0 3952 584 ? S Nov19 0:00 sh -c /opt/psa/admin/sbin/statistics
root 28060 0.0 0.1 210448 25064 ? S Nov19 0:00 /usr/bin/sw-engine -c /opt/psa/admin/conf/php.ini /opt/psa/admin/sbin/statistics
root 28063 0.0 0.0 3952 588 ? S Nov19 0:00 sh -c '/opt/psa/admin/bin/statistics_collector'
root 28064 0.0 0.0 79092 4608 ? S Nov19 0:07 /opt/psa/admin/bin/statistics_collector
But I don't see statistics updated after a few hours.
 
Back
Top