Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-17-2012, 03:07 AM
|
#1
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Rep:
|
Logs not rotating
Hi guys. I looked in /var/log on one of my older servers, and noticed the logs weren't rotating. so i went to /etc/cron.daily and tried to run a ./logrotate since i saw /etc/cron.daily/logrotate was setup as a cron job.
When i ran the ./logrotate, i got the following errors and it doesn't appear that any of the logs created new files. Any ideas how I can fix this?
error: bad year 1992 for file /var/log/cups/access_log in state file /var/lib/logrotate.status
error: could not read state file, will not attempt to write into it
|
|
|
08-17-2012, 03:10 AM
|
#2
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Original Poster
Rep:
|
Here's the /var/lig/logrotate.status file
logrotate state -- version 2
"/var/log/acpid" 2006-12-29
"/var/log/cups/access_log" 1992-8-23
"/var/log/cups/error_log" 1992-8-23
"/var/log/httpd/*log" 2006-12-29
"/var/log/mgetty.log.tty[^.]" 2006-12-29
"/var/log/mgetty.log.tty[^.][^.]" 2006-12-29
"/var/log/mgetty.log.tty[^.][^.][^.]" 2006-12-29
"/var/log/mgetty.log.tty[^.][^.][^.][^.]" 2006-12-29
"/var/log/mgetty.log.tty[^.][^.][^.][^.][^.]" 2006-12-29
"/var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.]" 2006-12-29
"/var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.]" 2006-12-29
"/var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.]" 2006-12-29
"/var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.][^.]" 2006-12-29
"/var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.][^.][^.]" 2006-12-29
"/var/log/mgetty.log.unknown" 2006-12-29
"/var/log/mgetty.callback" 2006-12-29
"/var/log/ppp/connect-errors" 2006-12-29
"/var/account/pacct" 2006-12-29
"/var/log/rpmpkgs" 1992-8-23
"/var/log/samba/*.log" 2006-12-29
"/var/log/squid/access.log" 2006-12-29
"/var/log/squid/cache.log" 2006-12-29
"/var/log/squid/store.log" 2006-12-29
"/var/log/messages" 1992-8-23
"/var/log/secure" 1992-8-23
"/var/log/maillog" 1992-8-23
"/var/log/spooler" 1992-8-23
"/var/log/boot.log" 1992-8-23
"/var/log/cron" 1992-8-23
"/var/log/tux" 2006-12-29
"/var/log/up2date" 1992-8-23
"/var/log/xferlog" 1992-8-23
"/var/log/wtmp" 1992-8-23
"/var/log/samba/nmbd.log" 1992-8-23
"/var/log/samba/smbd.log" 1992-8-23
"/var/log/sa-update.log" 2007-3-10
"/var/log/httpd/access_log" 1992-8-23
"/var/log/httpd/error_log" 1992-8-23
"/var/log/httpd/ssl_access_log" 2012-2-25
"/var/log/httpd/ssl_error_log" 1992-8-23
"/var/log/httpd/ssl_request_log" 2012-2-25
"/var/log/vsftpd.log" 2009-10-2
|
|
|
08-17-2012, 05:22 AM
|
#3
|
Moderator
Registered: May 2001
Posts: 29,415
|
Quote:
Originally Posted by rjo98
error: could not read state file, will not attempt to write into it
|
Code:
mv -f /var/lib/logrotate.status /var/lib/logrotate.status.$$; touch /var/lib/logrotate.status;
chown 0:0 /var/lib/logrotate.status; chmod 0644 /var/lib/logrotate.status;
# test:
/usr/sbin/logrotate -d /etc/logrotate.conf
# and force run:
/usr/sbin/logrotate -f /etc/logrotate.conf
|
|
2 members found this post helpful.
|
08-17-2012, 05:26 AM
|
#4
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Original Poster
Rep:
|
That did it! thanks unSpawn. but what does that $$ do exactly? looks like it put numbers in for that, but not sure why.
|
|
|
08-17-2012, 06:16 AM
|
#5
|
Moderator
Registered: May 2001
Posts: 29,415
|
The PID of your current shell session.
|
|
1 members found this post helpful.
|
08-17-2012, 06:16 AM
|
#6
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Original Poster
Rep:
|
oh ok, thanks for all the help.
|
|
|
All times are GMT -5. The time now is 01:30 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|