newsyslog running twice with $W1DO5 as when field - with solution

2005-08-15 Thread Bill
Well since I wrote it all down below I think I know what happened.
Maybe this will help someone else as dumb as me someday.  

I think the problem is that I also have ntpdate scheduled at 5am... so
the one second adjustment must have caused cron to run the newsyslog
again.  (the entries below show the second running one second earlier
than the first)

Curse this adled brain

I guess the moral of the story is to not have your time update near
another cron job...

Bill

---

It's not a question of if I am doing something wrong, its what...

On 3.7:

I changed my /var/log/maillog rotation to use $W1D05 which according to
everthing I read, should mean Every week on Monday at 05:00.  Which
works great.  Wonderful.

Except for the entries I changed to that run twice right after each
other.

After the first time it ran I had this:

-rw---  1 root  wheel  473930 Aug 15 15:41 /var/log/maillog
-rw---  1 root  wheel 102 Aug 15 05:00 /var/log/maillog.0.gz
-rw---  1 root  wheel  452207 Aug 15 05:00 /var/log/maillog.1.gz

The maillog.0.gz log only contains this:
Aug 15 05:00:02 ironman newsyslog[29992]: logfile turned over
Aug 15 05:00:01 ironman newsyslog[3362]: logfile turned over

The other ones that were affected by this also seemed to have the two
different PID's when they were run, which leads me to think that two
instances of newsyslog were run for some reason...

I rescheduled one of my problem entries to run by itself at $W1D16
and it ran fine, as expected.  Since it has resolution to the hour
mark, I have to wait to have my next test of two at the same time run.

Has anyone seen this problem?  It only occurs on the ones that I did as
$W1D05 and I definatly only have one entry for it in cron...


Explosivo Internet Technologies Group
http://www.Explosivo.com
Hosting, Web Development, E-Commerce solutions and more

If you have received this e-mail in error, please ignore and delete



Re: newsyslog running twice with $W1DO5 as when field - with solution

2005-08-15 Thread Simon Farnsworth
On Monday 15 August 2005 21:16, Bill wrote:
 I think the problem is that I also have ntpdate scheduled at 5am... so
 the one second adjustment must have caused cron to run the newsyslog
 again.  (the entries below show the second running one second earlier
 than the first)

Out of interest, why are you running ntpdate instead of ntpd? In theory, ntpd
should provide you with equally good or even better time updating (even in
the presence of things like network connections that are rarely up), and
won't trigger things like the same cron job running twice.
--
Simon Farnsworth

[demime 1.01d removed an attachment of type application/pgp-signature]



Re: newsyslog running twice with $W1DO5 as when field - with solution

2005-08-15 Thread Bill
I did ntpd years and years back under linux when I was getting started
and had a bunch of issues, so I just have not revisited it.  Perhaps I
will give it a look.

I just threw it in to get something running... of course had I known
this would be a problem...  

I'll spend some time checking it out



On Mon, 15 Aug 2005 21:29:56 +0100
Simon Farnsworth [EMAIL PROTECTED] wrote:

 On Monday 15 August 2005 21:16, Bill wrote:
  I think the problem is that I also have ntpdate scheduled at 5am... so
  the one second adjustment must have caused cron to run the newsyslog
  again.  (the entries below show the second running one second earlier
  than the first)
 
 Out of interest, why are you running ntpdate instead of ntpd? In theory, ntpd
 should provide you with equally good or even better time updating (even in
 the presence of things like network connections that are rarely up), and
 won't trigger things like the same cron job running twice.
 --
 Simon Farnsworth
 
 [demime 1.01d removed an attachment of type application/pgp-signature]
 


-- 


Explosivo Internet Technologies Group
http://www.Explosivo.com
Hosting, Web Development, E-Commerce solutions and more

If you have received this e-mail in error, please ignore and delete



Re: newsyslog running twice with $W1DO5 as when field - with solution

2005-08-15 Thread Simon Farnsworth
On Tuesday 16 August 2005 00:11, Bill wrote:
 I did ntpd years and years back under linux when I was getting started
 and had a bunch of issues, so I just have not revisited it.  Perhaps I
 will give it a look.

If by years and years ago, you mean in the 2.0 kernel era, then things are
much better now (both under Linux 2.2 and later kernels, and under supported
OpenBSDs). ntpd is easier to configure, thanks to the pool.ntp.org project,
and modern kernels (for some rather large values of modern) include support
needed to make ntpd work well. Plus, there's the OpenNTPD project, from the
OpenBSD team.

 I just threw it in to get something running... of course had I known
 this would be a problem...

For the archives, running ntpdate from cron is dangerous when the time
adjustment is going to be backwards; it will cause the same second to
happen twice, which can trigger all sorts of entertainment (cron firing the
same job twice, make getting confused and other such fun).
--
Simon Farnsworth

[demime 1.01d removed an attachment of type application/pgp-signature]



Re: newsyslog running twice with $W1DO5 as when field - with solution

2005-08-15 Thread Bill
On Tue, 16 Aug 2005 00:44:20 +0100
Simon Farnsworth [EMAIL PROTECTED] wrote:
 For the archives, running ntpdate from cron is dangerous when the time
 adjustment is going to be backwards; it will cause the same second to
 happen twice, which can trigger all sorts of entertainment (cron firing the
 same job twice, make getting confused and other such fun).
 --

I'm convinced - thanks for the info


-- 

Bill Chmura


Explosivo Internet Technologies Group
http://www.Explosivo.com
Hosting, Web Development, E-Commerce solutions and more

If you have received this e-mail in error, please ignore and delete