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

thevinster 14th September 2005 14:00

Statistics not compiling.
 
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?

falko 14th September 2005 14:02

Quote:

Originally Posted by thevinster
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.

thevinster 15th September 2005 10:50

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

falko 15th September 2005 11:15

Quote:

Originally Posted by thevinster
Nope... there are no errors, but the stats just don't compile.

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.

thevinster 16th September 2005 12:03

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)


falko 16th September 2005 13:12

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.

Ovidiu 19th September 2005 02:47

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?

jmroth 25th September 2005 01:38

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

thevinster 6th October 2005 18:06

This worked perfectly. Great job!

kuyaedz 2nd December 2005 02:13

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)


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

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