• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Resolved statistics --calculate-list --domain-names will calculate all domains

nethubonline

Regular Pleskian
Username:

TITLE

statistics --calculate-list --domain-names will calculate all domains

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

Plesk Version 18.0.63 Update #1, AlmaLinux release 9.3 x64

PROBLEM DESCRIPTION

According to statistics: Calculating Statistics , running command "plesk sbin statistics --calculate-list --domain-names=example.net,example.com" should only calculate statistics for the specified domains, but actually it will calculate statistics for all domains.

STEPS TO REPRODUCE

  1. Run command: plesk sbin statistics --calculate-list --domain-names=example.net,example.com
  2. check process by command: watch -n1 "ps axu|grep awstats"

ACTUAL RESULT

it will calculate statistics for all domains

EXPECTED RESULT

calculate statistics for the specified domains

ANY ADDITIONAL INFORMATION

(DID NOT ANSWER QUESTION)

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Confirm bug
 
Hello, @nethubonline. Thank you for the report. We attempted to reproduce the described behavior, however, on our environment the '--calculate-list' flag operates properly and the data is calculated only for the specified domain names. With that said, could you please provide us with more information on how did you verify the script is not functioning as intended? If possible, could you please include the -v flag while running the command, for example:
plesk sbin statistics --calculate-list --domain-names=example.net,example.com -v

Thank you in advance.
 
Dear Sebahat,

I did try include -v , the verbose log shows only specified domain names, however in fact it run all domains in the background, that's why I mentioned in step 2: check process by command: watch -n1 "ps axu|grep awstats"

Below are some process list, if you have enough quantity of domain names, you will see it generates every domains, like -config=t1.com-http , -config=t2.com-http , -config=t3.com-http

Code:
root       31265  0.3  0.0 227528  7256 pts/0    S    10:22   0:00 /usr/bin/perl /usr/share/awstats/tools/awstats_buildstaticpages.pl -awstatsprog=/usr/share/awstats/wwwroot/cgi-bin/awstats.pl -configdir=/usr/local/psa/etc/awstats -config=t1.com-http -dir=/var/www/vhosts/system/t1.com/statistics//webstat/current
root       31294  0.0  0.0 222504  3536 pts/0    S    10:22   0:00 sh -c "/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" -config=t1.com-http -staticlinks -configdir=/usr/local/psa/etc/awstats -output=urlexit  2>&1
root       31295 12.0  0.0 247568 27360 pts/0    R    10:22   0:00 /usr/bin/perl /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=t1.com-http -staticlinks -configdir=/usr/local/psa/etc/awstats -output=urlexit


Since we have over a hundred of domain names, so we can easily see the awstats is generating for all domain names one by one. We found the problem because somehow the server is very high CPU loading in day time, the reason is that it generates the statistics for all domains, we guess it maybe triggered by a customer who clicks to refresh usage stats. Hence it should be fixed or otherwise a simple click by customer may generate high CPU usage at any time.
 
Thank you for the detailed explanation. I have forwarded the case to our engineers for further investigation. As soon as there are more details on the matter, we will let you know. Thank you in advance for your patience in the meantime.
 
Hello, @nethubonline. Our team confirmed that although the command plesk sbin statistics --calculate-list --domain-names=domain1.com,domain2.com calculates statistics correctly for the domains, webStatistics are indeed generated for all domain names.
Thank you for bringing that to our attention. The bug is confirmed with ID PPPM-14562. The changelog may be observed here. At this point, we cannot provide any ETA, but we will do our best to release the fix as soon as possible.
In the meantime, the only workaround we can suggest for skipping web-statistics collection is to add the no-webstat flag.
 
We have released an update today which fixes the issue with the statistics calculation. If you have automatic updates enabled (and already run Plesk version 18.0.64) this update should be installed automatically overnight. Plesk Obsidian 18.0.64
The plesk bin statistics --calculate-list command with the domain-names or domain-ids options again calculates statistics only for the specified domains. (PPPM-14562)
 
Back
Top