View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 1 post ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: Huge mythbackend.log
PostPosted: Fri Jan 05, 2007 9:50 pm 
Offline
Joined: Wed Feb 01, 2006 12:49 pm
Posts: 42
I am going to share an experience in case it will help anyone in the future. I am using R5D1.

My backend froze and wold not restart this morning- a box showed up in the GDM saying that it could not log in the mythtv user because there was no access to the drive, or the disk was full.

I did all sorts of searching, and it turns out that my root partition was full. These threads helped me see the light:
http://mysettopbox.tv/phpBB2/viewtopic.php?t=9818&highlight=mysql+log
http://mysettopbox.tv/phpBB2/viewtopic.php?t=9261&highlight=mysql+log

I used the command:
Code:
cd /
du -xsh *


I repeated that command, following the directories with the biggest file sizes. This lead me to my /var/log/mythtv directory. It turns out I had 8 different mythbackend.log files and the first one was HUGE, at 1.6GB.

If you read the above thread, you will learn that there is a command that actually checks your log files, backs them up when they get a certain size or old, and resets them. To manually start this process:

Code:
/usr/sbin/logrotate /etc/logrotate.conf -f


Normally, logrotate automatically runs on a specified (most likely daily) basis. Since my mythbackend.log file was friggin' 1.6 gig it was trying to copy and compress that on my drive- filling it completely up.

I learned all of the logrotate options here: http://www.mythtv.org/wiki/index.php/Log_File_Rotation

Then I discovered that, in Knoppmyth, the setting file is mythtv-backend, located in the /etc/logrotate.d directory. I ended up deleting my mythbackend.log and recreated the file with 0 bytes. Then, I changed /etc/logrotate.d/mythtv-backend to:
Code:
/var/log/mythtv/mythbackend.log {
        copytruncate
        daily
        size 10M
        missing OK
        rotate 2
        compress
        notifempty
}


This will check the file daily and limit its size to 10 megz and limit it to 2 backups. Again, refer to the link on logrotate above and you will understand even better.....

Now you know.

-Loco


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu