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?
Do you have error messages from cron in /var/log/messages or /var/log/syslog? The statistics URL would be www.example.com/stats.
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.
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)
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.
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?
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
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)
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.
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?
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.
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?
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!
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
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.