Statistics not compiling.

Discussion in 'Installation/Configuration' started by thevinster, Sep 14, 2005.

  1. thevinster

    thevinster New Member

    Hi,

    I'm having some trouble with my statistics not compiling. Unless I run the log.php manually, cron doesn't seem to be doing it. How do I check / fix this?

    I run Debian 3.1, and have installed to Falko's Perfect Setup instructions.

    Also, what URL would I use to view the statistics?
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Do you have error messages from cron in /var/log/messages or /var/log/syslog?

    The statistics URL would be www.example.com/stats.
     
  3. thevinster

    thevinster New Member

    Nope... there are no errors, but the stats just don't compile.
     
  4. falko

    falko Super Moderator ISPConfig Developer

    There are really no errors? Maybe you've overseen them. Run

    Code:
    grep -i cron /var/log/messages
    and
    Code:
    grep -i cron /var/log/syslog
    to find the cron related lines.
     
  5. thevinster

    thevinster New Member

    This is what I get:


    Code:
    Sep 16 06:39:01 econwiki /USR/SBIN/CRON[4700]: (root) CMD (  [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
    Sep 16 07:09:01 econwiki /USR/SBIN/CRON[5112]: (root) CMD (  [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
    Sep 16 07:17:01 econwiki /USR/SBIN/CRON[5219]: (root) CMD (   run-parts --report /etc/cron.hourly)
    Sep 16 07:39:01 econwiki /USR/SBIN/CRON[5485]: (root) CMD (  [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
    Sep 16 08:09:01 econwiki /USR/SBIN/CRON[5860]: (root) CMD (  [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
    Sep 16 08:17:01 econwiki /USR/SBIN/CRON[5966]: (root) CMD (   run-parts --report /etc/cron.hourly)
    Sep 16 08:39:01 econwiki /USR/SBIN/CRON[6232]: (root) CMD (  [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
    Sep 16 09:09:01 econwiki /USR/SBIN/CRON[6602]: (root) CMD (  [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
    Sep 16 09:17:01 econwiki /USR/SBIN/CRON[6708]: (root) CMD (   run-parts --report /etc/cron.hourly)
    Sep 16 09:39:01 econwiki /USR/SBIN/CRON[6995]: (root) CMD (  [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
    
     
  6. falko

    falko Super Moderator ISPConfig Developer

    We need log entries from the time between 00.00h and 5.00h because that's the time when the statistics related cron jobs run.
     
  7. Ovidiu

    Ovidiu Active Member

    I have exactly the same problem: no stats get compiled.

    heres is what a grep -i grep -i cron /var/log/syslog > crongrep delivers into crongrep file. in messages there are no cron entries.

    Code:
    Sep 18 22:39:01 h5810 /USR/SBIN/CRON[17505]: (root) CMD (  [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
    Sep 18 23:00:01 h5810 /USR/SBIN/CRON[17770]: (root) CMD (   test -x /usr/sbin/tigercron && /usr/sbin/tigercron -q)
    Sep 18 23:05:01 h5810 /USR/SBIN/CRON[17951]: (logcheck) CMD (   if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi)
    Sep 18 23:09:01 h5810 /USR/SBIN/CRON[18772]: (root) CMD (  [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
    Sep 18 23:17:01 h5810 /USR/SBIN/CRON[18879]: (root) CMD (   run-parts --report /etc/cron.hourly)
    Sep 18 23:39:01 h5810 /USR/SBIN/CRON[19148]: (root) CMD (  [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
    Sep 19 00:00:01 h5810 /USR/SBIN/CRON[19413]: (root) CMD (   test -x /usr/sbin/tigercron && /usr/sbin/tigercron -q)
    Sep 19 00:05:01 h5810 /USR/SBIN/CRON[20762]: (logcheck) CMD (   if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi)
    Sep 19 00:09:01 h5810 /USR/SBIN/CRON[21579]: (root) CMD (  [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
    Sep 19 00:17:01 h5810 /USR/SBIN/CRON[21685]: (root) CMD (   run-parts --report /etc/cron.hourly)
    Sep 19 00:39:01 h5810 /USR/SBIN/CRON[21955]: (root) CMD (  [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
    Sep 19 01:00:01 h5810 /USR/SBIN/CRON[22221]: (root) CMD ([ -x /usr/share/john/cronjob ] && nice /usr/share/john/cronjob start)
    Sep 19 01:00:01 h5810 /USR/SBIN/CRON[22222]: (root) CMD (   test -x /usr/sbin/tigercron && /usr/sbin/tigercron -q)
    Sep 19 01:05:01 h5810 /USR/SBIN/CRON[30646]: (logcheck) CMD (   if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi)
    Sep 19 01:09:01 h5810 /USR/SBIN/CRON[31489]: (root) CMD (  [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
    Sep 19 01:17:01 h5810 /USR/SBIN/CRON[31646]: (root) CMD (   run-parts --report /etc/cron.hourly)
    Sep 19 01:39:01 h5810 /USR/SBIN/CRON[32147]: (root) CMD (  [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
    
    I gave you only the parts from the time interval you were asking from,
    but I had a strange section
    Code:
    Sep 18 11:41:01 h5810 /usr/sbin/cron[662]: (*system*logcheck) RELOAD (/etc/cron.d/logcheck)
    Sep 18 11:41:01 h5810 /usr/sbin/cron[662]: (root) WRONG INODE INFO (crontabs/root)
    Sep 18 11:44:01 h5810 /usr/sbin/cron[662]: (*system*john) RELOAD (/etc/cron.d/john)
    Sep 18 11:44:01 h5810 /usr/sbin/cron[662]: (root) WRONG INODE INFO (crontabs/root)
    Sep 18 11:45:01 h5810 /usr/sbin/cron[662]: (*system*logcheck) RELOAD (/etc/cron.d/logcheck)
    Sep 18 11:45:01 h5810 /usr/sbin/cron[662]: (root) WRONG INODE INFO (crontabs/root)
    
    I guess that was when I run the commands manually?
     
  8. jmroth

    jmroth ISPConfig Developer ISPConfig Developer

    Hi there,
    I have had a similar problem...
    I noticed that a few crons were running, for whatever reason.
    Try to do a
    /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
    Worked fine here...
    Regards,
    ~jm
     
  9. thevinster

    thevinster New Member

    This worked perfectly. Great job!
     
  10. kuyaedz

    kuyaedz New Member

    I've followed these instructions too. Do I now need to wait 24hrs to give cron a chance to run again?

    Also, it mentions editing crontab (crontab -e) and save again. Is there something I need to 'edit' or just re-save? I'm having the same issue of stats not compiling & not access at www.domain.com/stats/ (404 Error)
     
  11. falko

    falko Super Moderator ISPConfig Developer

    You have to wait until your cron job is scheduled to run the next time, so if you have a cron job that is run once a day, then you have to wait 24h in the worst case.

    You don't need to change anything. Just save.
     
  12. kuyaedz

    kuyaedz New Member

    ok I've done as suggested and, for whatever reason, I still don't get a /stats/ directory (directory doesn't exist under any of my six domains hosted). Any other suggestions?
     
  13. misterm

    misterm Member HowtoForge Supporter

    Hello

    I had the same error, is all was to return in the order after 24hrs.

    :D
     
  14. falko

    falko Super Moderator ISPConfig Developer

    Run
    Code:
    grep -i cron /var/log/syslog
    and see if you can find errors related to the logs.php or webalizer.php script. The webalizer.php script runs at 4.00h every morning.
     
  15. danf.1979

    danf.1979 ISPConfig Developer ISPConfig Developer

    Is this ok?
    Code:
    root@Alcon:/home/dan# crontab -l
    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
    
    Why is webalizer pointing to dev/null?
     
  16. falko

    falko Super Moderator ISPConfig Developer

    Yes.

    This is just to redirect any output that the scripts produce (status messages, etc.) to /dev/null because otherwise you'd get an email with the output everytime a cron job runs which can be quite annoying after some time.
    It does not mean that the statistics that webalizer produces are sent to /dev/null! :)
     
  17. nenad

    nenad ISPConfig Developer ISPConfig Developer

    /etc/init.d/cron stop

    won't work for me (Fedora Core 3)
     
  18. falko

    falko Super Moderator ISPConfig Developer

    On Fedora it's
    Code:
    /etc/init.d/cron[B][COLOR="Red"]d[/COLOR][/B] stop
     
  19. nenad

    nenad ISPConfig Developer ISPConfig Developer

    I have:

    403 Error- Forbidden!

    when I try to login ?

    username / password are valid

    statistics are compiled, pages (index.html) and images (png) are generated
     
    Last edited: Mar 14, 2006
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    Which username and password do you use to login to the stats. It must be a valid email username and password that has not been added or changed after the last run of the statistics script.
     

Share This Page