• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Quotas and Traffic counters not working

R

RodrigoM

Guest
Hello!

I'm pretty new to the plesk admin world and I'm getting some troubles that are turning me crazy. I've searched through this forum, google several times but I just found nothing. Here are the description:

Quotas and Traffic count are not working in plesk.

System: Debian etch with user and group quotas activated in the /var partition.

Symptoms: I've created a domain based on a preconfigured Domain Template. In this domain template "Overuse is not allowed" and I've stablished a Disk space Limit of 20 MB and a Traffic limit of 50MB (just for testing!). I've, also, selected "Physical hosting" with a hard disk quota of 20 MB (same as previous selected disk space limit). Theoretically, everything should be alright BUT!...

- When I connect to the hosting via FTP (using FileZilla Client) and I transfer a file I get the first message that tells me something is wrong:

Answer: 226-Transfer complete
Answer: 226 Quotas off


"Quotas off" =oS

- Let's check the disk status for this domain in plesk: "Disk usage: 0 MB". ooops! Plesk didn't notice the uploaded file.

- Let's check what Debian has to tell about this:

# quota ecotur
Disk quotas for user ecotur (uid 10001):
Filesystem blocks quota limit grace files quota limit grace
/dev/mapper/vg01-var
6856 0 20480 156 0 0


So, SO's quotas are working but plesk didn't notice that change.

- Let's download the file and check the traffic for this domain in plesk: "Traffic: 0.00 MB/month". Plesk also didn't notice neither the upload nor the download transfer.

OK, something is really not working. Let's restart the server. ... Nothing!. BUT after 24 hours the disk space was updated. =o|.

May be is there any cron doing the job, but... which one?

Yet another test: I deleted the file. The disk usage didn't changed. Should be 0 MB but it says 6.8 MB.

Finally, the traffic still is 0.00 MB/month. It's curious because the AWstats reflects the traffic correctly.

What's wrong with plesk? I'm completely lost. I don't know what to do.

Perhaps the solution is creating a new cron executing that MAGIC script which updates the information BUT, what's the script?


Could you, please, give me some advice or some light on this?

Thank you so much.

Rod.
 
Hello,

It is Parallels Plesk Panel statistics that calculates the traffic, disk usage, etc.

PP utility statistics is launched from root crontab (crontab -l)

7 4 * * * /usr/local/psa/admin/sbin/statistics >/dev/null 2>&1

or it is a daily task specified in /usr/local/etc/psa/plesk-cron.daily/50plesk-daily or /etc/cron.daily/50plesk-daily.

# install_statistics
/usr/local/psa/admin/sbin/statistics >/dev/null 2>&1

It is scheduled to run once a day, that is why the usage and traffic parameters are not changed immediately, only after the statistics run and check the logs.
 
Thank you Natalia!!

I've been making some tests. I find possible to refresh more often the counters with a cron executing this command

/usr/local/psa/admin/sbin/statistics >/dev/null 2>&1


every 5 minutes or so. But I would like to know few things about this:

- Each time it is executed I recieve an e-mail with information about quota-exceeded domains and hostings. This is not desirable. I would like this report just once a day.

- Is there any way to dissociate the counter refreshing from quota exceeded emails or similar?

- Which other actions occur when this command is executed? or... in other words... What secundary effects could appear due to running the command every 5 minutes? (growing log files without measure, perhaps?).


This is just an appreciation but... I found this plesk behaviour a serious lack of functionality nowadays. Why this "little" detail is not mentioned in the product description page?.

Thank you so much for your time, again.

Rod.
 
Hello,

Actually, in Parallels Plesk Panel 9 statistics is processed with script DailyMaintainance/script.php that is executed from daily cron job:

~# cat /etc/cron.daily/50plesk-daily
...
# install_statistics
/usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php >/dev/null 2>&1
...
~#
Purpose of the script is the following:

The script starts utility "statistics" that processes Apache logs for each domain. The utility counts the inbound and outbound traffic, counts the disk space occupied by Web content, log files, databases, mailboxes, Web applications, mailing list archives, and backup files.
After the "statistics" utility has finished the script processes resource usage for Plesk domains/clients/resellers. According to resource usage settings limits notifications are sent and objects are suspended.

Therefore, you do not need to run statistics manually, just wait until its daily recalculation by Plesk.

To disable resource overuse notifications go Home > Domains > domain.name > Resource Usage and uncheck the Notify the domain owner about reaching the resource limits checkbox.

Regards,
Denis
 
Back
Top