LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-29-2003, 12:32 PM   #1
kingroom
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Rep: Reputation: 0
Angry logratote drove me to crazy!!!!!


I found a command '/usr/sbin/logrotate' running on my machine(redhat 7.3) again and again. every time it eats more than 95% CPU time and runs a long long time! i killed it, but it will run again and again. this nearly drives me out of my mind. who can tell me what's the problem and how to fix it?

Thinks
 
Old 08-29-2003, 12:34 PM   #2
kingroom
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Original Poster
Rep: Reputation: 0
the command name should be logrotate, sorry
 
Old 09-10-2003, 12:06 PM   #3
JoeDuncan
Member
 
Registered: Aug 2003
Location: Ottawa
Distribution: Redhat 5.2, 6.0, 6.1, Mandrake 7.2, 8.0, 9.1, 9.2, 10.0, Gentoo, Debian 3.1r0
Posts: 224

Rep: Reputation: 30
Logrotate is a program that will periodically compress or delete your log files so that they don't wind up consuming your entire harddrive.

All the log files is works on are found in /var/log

However, when it takes forever and ever, it is most likely that you have used up most of your harddrive space and it is madly swapping stuff in and out of virtual memory in order to get the job done.

Also, you may have a misconfigured logrotate.

First of all you should do "man logrotate" to learn about logrotate (it is a good thing, trust me).

Then you should do a "df", which will show you how much free space you have on disk. If you disk usage is near 100% you have a problem.

Also, take a look at the logs in /var/log/mail, /var/log/news etc..., sometimes with a misconfigured logrotate it can end up re-compressing the same files over and over again leading to hundreds of files something like this:

mail.1.gz
mail.1.gz.gz
mail.1.gz.gz.gz
mail.1.gz.gz.gz.gz
mail.1.gz.gz.gz.gz.gz...
....etc you get the picture...

Hunt around in your /var/log directory, if you see stuff like this for other logs as well, it's a good bet you have a misconfigured logrotate that is uselessly compressing the same file over and over again.

IIRC, the config file should be: /etc/logrotate.conf or something (there may be a config directory in /etc for logrotate, it should be easy to find...)

Anyways, if logrotate is misconfigured you will need to edit the config file to be more specific (i.e. instead of having it rotate /var/log/mail/mail.*, specify explicitly only the log files you want it to rotate) or to delete logs rather than compress them (if you really don't need a 4 month log trace or whatever...)

If you still need a hand, get back to me...
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Crazy winxshadi76 Linux - Software 2 11-28-2004 10:51 AM
PC gone crazy Boby General 10 11-28-2004 05:06 AM
Is this possible or am I just crazy? elevators_out Linux - Hardware 2 01-25-2004 04:12 PM
i'LL BE CRAZY.... haeffner Linux - Hardware 4 08-24-2003 08:48 PM
Are you crazy... X11 General 7 04-10-2002 05:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:53 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration