LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-17-2002, 09:26 AM   #1
magyartoth
Member
 
Registered: Feb 2002
Location: Pittsburgh, PA, USA
Posts: 73

Rep: Reputation: 15
Help with crontab log error


The cron daemon keeps emailing me informing me of an error. Problem is, I can't figure out why it is erroring out. This is the error message:

/etc/cron.daily/logrotate:

error: bad top line in state file /var/lib/logrotate.status

The top and only line in /var/lib/logrotate.status is a "1". When I removed the line, I got this error:

/etc/cron.daily/logrotate:

error: error reading top line of /var/lib/logrotate.status

So obviously, something needs to be in the top line of that file and it's not supposed to be a "1".

Any ideas on what it should be?

Thanks,
M
 
Old 06-17-2002, 09:34 AM   #2
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 55
This is what I have at my production workstation (RH7.2)
Quote:
logrotate state -- version 2
"/var/log/htmlaccess.log" 2002-5-22
"/var/log/netconf.log" 2002-6-1
"/var/log/messages" 2002-6-16
"/var/log/secure" 2002-6-16
"/var/log/maillog" 2002-6-16
"/var/log/spooler" 2002-6-16
"/var/log/boot.log" 2002-6-16
"/var/log/cron" 2002-6-16
"/var/log/wtmp" 2002-6-1
"/var/log/rpmpkgs" 2002-6-16
"/var/log/up2date" 2002-6-16
 
Old 06-17-2002, 09:41 AM   #3
magyartoth
Member
 
Registered: Feb 2002
Location: Pittsburgh, PA, USA
Posts: 73

Original Poster
Rep: Reputation: 15
Any idea on what generates this file? I recently moved all my logs to /usr/log and Im certain this is the reason. However, I thought I've changed everything to reflect this move.


Thanks!
M
 
Old 06-20-2003, 04:16 AM   #4
m3gan
LQ Newbie
 
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: RedHat8.0
Posts: 1

Rep: Reputation: 0
Found this thread through a search, it is a bit late now but wanted to post an answer for posterity's sake.

Delete the empty logrotate.status and run logrotate again:

/etc/cron.daily/logrotate /etc/logrotate.conf

The logrotate.status will be recreated automatically.
 
Old 06-20-2003, 05:17 AM   #5
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,675

Rep: Reputation: Disabled
If you don't want the file here but in /usr/log, why don't you create a link?
 
Old 12-21-2004, 01:05 AM   #6
dawood
LQ Newbie
 
Registered: Dec 2002
Location: Pune
Posts: 21

Rep: Reputation: 15
Hi,
Even i faced the same problem. The simple solution for this is :
1> Take a back up of the logrotate.status file.
mv /var/lib/logrotate.status /var/lib/logrotate.status.bak

2> Run to logrotate sommand manually to regenerate this file again
logrotate -fv /etc/logrotate.conf

This should solve your problem.

Do let us know in case you face any problem.

Cheers

dawood
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: mail command failed for /var/log/squidguard/squidGuard.log.6 Niceman2005 Linux - Networking 1 01-22-2009 01:24 PM
Crontab Error Drunkalot Linux - General 7 07-07-2005 09:34 AM
error running script on crontab haora Linux - Newbie 3 03-11-2005 04:02 PM
Error log in /var/log/messages raymond117 Linux - Security 9 01-26-2005 07:17 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM


All times are GMT -5. The time now is 02:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration