[ale] Fixing time error

Joe Steele joe at madewell.com
Mon Oct 21 14:36:21 EDT 2002


In addition to fixing your clock, I think you will also need to fix 
your "/var/lib/logrotate.status" file.  Until you eliminate the bad 
dates in the file, logrotate will complain and your logs will not be 
rotated.

Since the file contains text, you can easily edit it.  Its purpose is 
to keep track of the last time the various logs were rotated, which 
is used to decide if it is time to rotate them again.  If logrotate 
encounters a year less than 1996, it complains and dies (as you have 
witnessed).

To fix the file, you can either 1) correct the dates, 2) delete the 
lines that have bad dates, or 3) delete the entire file.  If you 
delete individual lines, then you will force a rotate of the affected 
logs.  If you delete the entire file, you will force a rotate of all 
logs and the file will be recreated.

--Joe


On Monday, October 21, 2002 11:31 AM, James P. Kinney III wrote:
> Step 1. Replace the bios battery!
> #2 Add a line in rc.local that sets the system time from a good time
> source. Mine is:
>
> /usr/bin/rdate -s ntp1.csx.cam.ac.uk && /sbin/hwclock --systohc --utc
>
> This sets system time from ntp1.csx.cam.ac.uk and then sets hardware
> clock from system time.
>
> Use the last part, /sbin/hwclock --systohc --utc , as part of a shutdown
> script .
>
> But replace the battery ASAP!
>
> On Mon, 2002-10-21 at 11:24, Tomer Tishgarten wrote:
> > I keep getting an error message (see below).  I know it must be due to a
> > recent restart. During the process, the time within the BIOS was lost
> > (it looks like my battery on the motherboard is dead).  When I brough it
> > back up, I started it under the default time, which included 1980 as the
> > year.  And ever since that, my time is stuck though I've gone back in the
> > BIOS and updated it.  How do I fix this issue?
> >
> > Thanks in advance for your help,
> > Tomer
> > 
> > ---------- Forwarded message ----------
> > Date: Mon, 21 Oct 2002 04:02:00 -0400
> > From: Cron Daemon <root at tish.dynu.com>
> > To: root at tish.dynu.com
> > Subject: Cron <root at tish> run-parts /etc/cron.daily
> >
> > /etc/cron.daily/logrotate:
> >
> > error: bad year 1980 for file /var/log/messages in state file /var/lib/logrotate.status
> >


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list