I use syscp on debian and i noticed that this script is taking more than 10 minutes to execute:
date ; /usr/bin/php5 -q /var/www/syscp/scripts/cron_traffic.php; date
Do 5. Dez 12:09:09 CET 2013
Do 5. Dez 12:21:53 CET 2013
And it uses much CPU on my athlone 2300 singlecore.
What is this script doing and can I comment out some functional parts in it that I might not need to speed it up?
I started
/usr/bin/php5 -q /var/www/syscp/scripts/cron_traffic.php;
watching the debuglog ($debugHandler) in another console with
tail -f /var/run/syscp_cron_traffic.lock-*
for each syscp user it starts this block:
http traffic for gw started...
ftp traffic for gw started...
total traffic for gw started
calculating webspace usage for gw
calculating mailspace usage for gw
calculating mysqlspace usage for gw
most of them are really slow!
here you see the source of the script: https://gist.github.com/rubo77/7821112