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 not working. (http://www.howtoforge.com/forums/showthread.php?t=9348)

willebanks 26th December 2006 15:58

Traffic Stats not working.
 
Hodwy all,

Everything is working as it should except that there aren't any traffic stats. This is a small matter and I can live without them but it would be nice to see how certain sites are doing.

Any guess as to the cause or a way to start stats would be truly helpfull!

Merry Christmas and Happy new year to all!

Will Banks

edge 26th December 2006 16:16

Stats are updated everyday at (I think) 04:00.

Hans 26th December 2006 16:38

If you are using Webalizer, the statistics are updated at 4 AM indeed.
So, for the first time, you have to wait maximum 24 hours.

After that moment, and if the stats are still not created, try these commands:

/etc/init.d/cron stop
pkill cron (Make sure no cron processes are left.)
Edit your crontab (crontab -e) and save it again.
Then restart cron: /etc/init.d/cron start

This worked for me, when my webalizer was a little bit lazy some time ago.

willebanks 31st December 2006 18:00

Howdy All,

Hope everyone had a safe and happy holiday, sorry I didn't reply sooner but with the holiday and family visiting from all over that map I just didn't have the time.

Since yesterday I have taken the time to "research" webalizer posts here and have noticed that I am not the only one with this problem. I have tried some of the suggestions here and I have noticed a few differences possibly related to my using Fedora Core 5.

I first tried to check my "cron" file by running crontab -e. This file came up empty. Yet I found a crontab file, the contents are such:

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

I have also found cron folders ( cron.hourly, cron.daily, and so on) in the /etc directory. In the cron.daily folder is a file called 00webalizer. The contents of which is a simple if statement:

if [ -s /var/log/httpd/access_log ]; then
exec /usr/bin/webalizer -Q

I have found webalizer stats files in the "/var/lib/webalizer/" directory. Oddly they are current. These files are pretty cool and informative...but there is no individual info for the different virtual web sites and I can only access the info from the above directory.

My guess is that I have to make some changes to the webalizer.conf file. Yet there are quite a few and I'm not sure which to change and what changes to make!

Hope all this helps...I realize this is alot of info! But I figured more was better!

Willebanks

till 1st January 2007 12:50

Are you sure you executed the command crontab -e as root user? If yes, your complete crontab from ISPConfig is missing. Dont edit anything in the webalizer configuration, it is not the cause of your problems and you will make things even worse!

To solve this, run:

crontab -e

as root and insert these lines:

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


willebanks 4th January 2007 01:26

Thanks Till,

I thought that something was wrong when the cron file was empty...I'll let you know how things workout!


willebanks

willebanks 5th January 2007 00:28

Thanks Till that did the trick!

And the best part is I even learned something!

Thanks again!

Will


All times are GMT +2. The time now is 07:04.

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