Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 06-17-2002, 10:26 AM   #1
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:


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:


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?

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

Rep: Reputation: 56
This is what I have at my production workstation (RH7.2)
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, 10:41 AM   #3
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.

Old 06-20-2003, 05:16 AM   #4
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, 06:17 AM   #5
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 4,062

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, 02:05 AM   #6
LQ Newbie
Registered: Dec 2002
Location: Pune
Posts: 21

Rep: Reputation: 15
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.




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 02:24 PM
Crontab Error Drunkalot Linux - General 7 07-07-2005 10:34 AM
error running script on crontab haora Linux - Newbie 3 03-11-2005 05:02 PM
Error log in /var/log/messages raymond117 Linux - Security 9 01-26-2005 08:17 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 01:35 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:57 PM.

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