The attached PHP script sends users and resellers information about the traffic and disk usage for their registered domains.
The script is normally meant to run once a day. Each domain is queried and the current resource usage is calculated against the allocated limits.
If the resource limit is exceeded, then the domain contact is sent an email, alerting them to the resource usage.
In addition, reseller accounts are sent a daily email that provides the resource usage for each administered domain, and a total against the resource limits allocated to the reseller.
Usage Notes
The tool is intended to run from the command line as a PHP script.
An example of this is :
Quote:php /var/www/ispcp/engine/tools/usage_reports.php
You can guess that I installed the script in var/www/ispcp/engine/tools/usage_reports.php
As an example, to run the script at midnight, add the following line to the file
/etc/cron.d/daily/ispcp
Quote:# resource usage - send email to customer - added by Pradesh - 2009/11/07
@daily root php /var/www/ispcp/engine/tools/usage_reports.php &>/var/log/ispcp/usage_reports.log