0

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

2
  • I could take a wild stab in the dark here, and guess that maybe it has to do with some kind of traffic/log analysis. Log analysis by its very nature is slow.
    – Zoredache
    Dec 5, 2013 at 22:27
  • 1
    Traffic analysis often does reverse IP lookups and these can be very slow. If it has configurable parameters, try turning that one off. Or edit the code.
    – Ladadadada
    Dec 5, 2013 at 23:37

1 Answer 1

0

This is not a solution but a workaround:

I changed the interval of the traffic cron to twice a month and at night (4:20 am) in:

/etc/cron.d/syscp

20 4 1,15 * * root /usr/bin/php5 -q /var/www/syscp/scripts/cron_traffic.php

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .