Traffic Stats not working.

Discussion in 'Installation/Configuration' started by willebanks, Dec 26, 2006.

  1. willebanks

    willebanks New Member

    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
  2. edge

    edge Active Member Moderator

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

    Hans Moderator ISPConfig Developer

    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.
  4. willebanks

    willebanks New Member

    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:


    # 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!

  5. till

    till Super Moderator Staff Member ISPConfig Developer

    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:

    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
  6. willebanks

    willebanks New Member

    Thanks Till,

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

  7. willebanks

    willebanks New Member

    Thanks Till that did the trick!

    And the best part is I even learned something!

    Thanks again!


Share This Page