HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   Traffic stats doesn't work (http://www.howtoforge.com/forums/showthread.php?t=1965)

ddelbia 8th January 2006 22:08

Traffic stats doesn't work
 
Hi all,

I've installed ISPConfig 3 days ago and traffic statistic doesn't work.

Apache log are splitted in daily files in /var/log/httpd but in the site's logdir, I see only error log and no directory "stats" under "web" (webalizer?)
Xferlog doesn't rotate.

crontab -e shows:

Code:

30 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/ftp_logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/mail_logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/cleanup.php &> /dev/null
0 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php &> /dev/null
0,30 * * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/check_services.php &> /dev/null
15 3,15 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/quota_msg.php &> /dev/null
40 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/traffic.php &> /dev/null
05 02 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/backup.php &> /dev/null

And this is the web site's statistic page

Code:

Traffic overview (in MB):
Month Web FTP Mail Overall

--------------------------------------------------------------------------------
Overall: 0.00 0.00 0.00 0.00

--------------------------------------------------------------------------------
Traffic in the last 4 years (in MB):
Year Web FTP Mail Overall
2006: 0.00 0.00 0.00 0.00
2005: 0.00 0.00 0.00 0.00
2004: 0.00 0.00 0.00 0.00
2003: 0.00 0.00 0.00 0.00

Any idea?

admin 9th January 2006 00:10

Have a look at this thread: http://www.howtoforge.com/forums/showthread.php?t=562

ddelbia 9th January 2006 11:18

Ok, all works fine now with theese simple commands:

Code:

/etc/init.d/cron stop
pkill cron
crontab -e

exit and save (with vi :wq)
and

Code:

/etc/init.d/cron start
But it's strange...

What could be happened?
Maybe a missing reboot after installation? :-)

Sinisfun 16th January 2006 00:57

I have the same issue however when I edit and save my crontab it is empty... is this correct? I have followed the link you provided a few times over however I still have no stats? Any ideas?

falko 16th January 2006 10:32

You must run
Code:

crontab -e
as root!

Sinisfun 17th January 2006 22:08

So yeah... I failed to run it as root... did as it said and I have stats now when I view them through my login to ISPconfig... Do I need to create a folder to access these through the web as in www.mydomain.tld/stats ?

falko 18th January 2006 07:46

Quote:

Originally Posted by Sinisfun
Do I need to create a folder to access these through the web as in www.mydomain.tld/stats ?

No, it's created automatically. :)

Sinisfun 19th January 2006 02:48

I dont want to be a pain really... :)

However it has been more than 36hrs since stats through the login screen have appeared and there still is no access through www.domain.tld/stats just a 404.

Is there a way I can manually run the script to create this dir?

Thanks again

falko 19th January 2006 08:12

And you're sure you ran
Code:

crontab -e
as root?

Quote:

Is there a way I can manually run the script to create this dir?
Run these commands:

Code:

/root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php
/root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php


Sinisfun 19th January 2006 09:13

When I run the first one I get
Code:

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125
however the second one seems to run fine. And as for your first question I am sure I ran crontab -e as root.. when I did that it compiled stats that night and had not any prior nights.

Thanks

On a side note when I run crontab -e again and save it it asks what to save it as and provides
Code:

File Name to Write: /tmp/crontab.xaWBur/crontab
is this correct to save it as?


All times are GMT +2. The time now is 16:35.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.