Traffic Collection Instructions

to make traffic collecting works you need to make sure that you added the cronjob in the installation

use crontab -e to add an 'every hour' cronjob:

10 * * * * /usr/bin/php -q /var/www/html/whmcs_dir/modules/servers/Xenica/cron/cron.php

Notice : cronjob must run every hour to get correct values

if you have so many VMs , and this file take a long time to finish , try to:

- disable any not used servers on whmcs (if the server is not reachable, script will wait for 'max connection time' to step over to the next server)

- you can separate cronjob into 2 files (every hour , and every day) like this

10 * * * * /usr/bin/php -q /var/www/html/whmcs_dir/modules/servers/Xenica/cron/gettraffic.php

30 2 * * * /usr/bin/php -q /var/www/html/whmcs_dir/modules/servers/Xenica/cron/getUUIDs.php

Notice : Traffic Collection feature needs python mysqldb to be installed.

if Traffic Collection is not working , please take a look at install instruction step 3 (Install python mysqldb)

and make sure python mysqldb is installed.

for more debugging info you can try to run the cronjob command manually to notice any error messages:

/usr/bin/php -q /var/www/html/whmcs_dir/modules/servers/Xenica/cron/cron.php

and you can also reach it from your browser (less debug info) just to make sure it is working properly and get the results:

- notice that php will use passthru function to call python scripts , so if passthru is disabled you will need to remove it from disable_functions in php.ini ,

  • traffic_instructions.txt
  • Last modified: 2019/08/15 15:33
  • by orwah