Skip to contentSkip to conversation

problem with cron job of Webalizer

DISCUSSION Miguel González Castaños 2 participants 3 messages Jun 10, 2003 – Jun 18, 2003

lore
Share & tools
lore
#0 lore raw

Dear all,

I have a RH linux box with Apache 1.3.27 with 4 virtual hosts. I have
installed Webalizer and have different access log files in Apache.

I have a script for executing webalizer for the different virtual
hosts. That script works in the command prompt.

I have been testing if it was dued to the environment variables, that
werent loaded, but I put on the script a ". /root/.bash_profile " instruction to avoid that.

I got a mail when the job is supposed to be done by cron.

In the access log files of apache, I use rotate logs. The rotate logs
of apache is done daily and before the webalizer cron job is donde.

What I have seen so far, its that sometimes it works and sometimes it
doesnt. Sometimes the system doesnt log all the accesses in all virtual hosts (some do work and others dont) and normally if the webalizer scripts updates fine the stats html files then apache stops logging the access files and the other way round...

Anyone could give any ideas of how I could trace the behaviour of the
system?

Many thanks

Miguel

#1 lore raw

Dear Miguel Gonz?lez Casta?os,

Once you wrote about "problem with cron job of Webalizer":
MGlCo> I have a script for executing webalizer for the different virtual MGlCo> hosts. That script works in the command prompt.
MGlCo>
MGlCo> I have been testing if it was dued to the environment variables, that MGlCo> werent loaded, but I put on the script a ". /root/.bash_profile " MGlCo> instruction to avoid that.
MGlCo>
MGlCo> I got a mail when the job is supposed to be done by cron. MGlCo>
MGlCo> In the access log files of apache, I use rotate logs. The rotate logs MGlCo> of apache is done daily and before the webalizer cron job is donde. MGlCo>
MGlCo> What I have seen so far, its that sometimes it works and sometimes it MGlCo> doesnt. Sometimes the system doesnt log all the accesses in all virtual MGlCo> hosts (some do work and others dont) and normally if the webalizer MGlCo> scripts updates fine the stats html files then apache stops logging the MGlCo> access files and the other way round...
MGlCo>
MGlCo> Anyone could give any ideas of how I could trace the behaviour of the MGlCo> system?

Did you try to run webalizer _before_ you rotate the logs? It's also a good idea to measure how much time does it take for your webalizer jobs to finish. This will help you to make sure webalizer has enough time before the logs are taken from it. :)

Signature · 4 lines
Best regards,
  Leonid Mamtchenkov, RHCE
  System Administrator
  Francoudi & Stephanou Ltd.
#2 lore raw

Hello,

I am trying to figure out what is going on, and I deactivate webalizer and check
how log rotation was doing and seems that all my logs of my virtual domains are rotated except "domain4"...Here goes my apache logrotate:

/usr/local/apache/logs/domain1/access.log
/usr/local/apache/logs/domain2/access.log
/usr/local/apache/logs/domain3/access.log

/usr/local/apache/logs/domain4/access.log {
    daily
    rotate 400
    mail [email protected]
    compress

prerotate
/etc/init.d/apache stop
endscript
postrotate
/etc/init.d/apache start
endscript
}

The domain4 log is the biggest one, dont know if it has something to do with the problem...

I tried to force logrotate to execute the apache log rotation and dont see anything wrong...

Many thanks

Miguel

Quoted 16 lines

Did you try to run webalizer _before_ you rotate the logs? It's also a good idea to measure how much time does it take for your webalizer jobs to finish. This will help you to make sure webalizer has enough time before the logs are taken from it. :)

--
Best regards,
Leonid Mamtchenkov, RHCE
System Administrator
Francoudi & Stephanou Ltd.

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html