Bug #528

Log files taking up too much space

Added by uteck about 15 years ago. Updated over 14 years ago.

Status:Closed Start date:
Priority:Normal Due date:12/31/1969
Assignee:cecil % Done:

0%

Category:- Spent time: -
Target version:7.3

Description

The log files in /var/log/, specifically everything.log and messages.log, are taking up all my free space in /. I have a 5GB / partition with about 1.2GB free. I have to manually delete the *log.1 files to free up space every week or so or I run out of space and the system starts to act goofy.

Should the system check disk space and delete old logs if space is running low? Can their be an on-screen warning that space is getting low?

History

Updated by mihanson about 15 years ago

Do you shut you box down when not in use? By default, daily cron jobs (which include logrotation) run a 2 min past midnight. If your box is not on, the job will not run and your logs will grow. You can "fix" this by running crontab -e as root and change the time cron.daily runs to a time your box is more likely to be on OR set a max file size of, say, 10M in /etc/logrotate.conf

Updated by uteck about 15 years ago

Yes, I leave it on almost 24x7 and it is the log rotation that is causing the problems. It renames messages.log and everything.log by appending .1 to them. Since each file gets to be almost 500mb prior to rotation, after they rotate and new ones are created I am almost out of space.

I don't see were to change the files size in /etc/logrotate.conf, is size=50m the correct format? I also enabled compression.
I am running with default settings, so I may not be the only one having this issue.
305M 2009-09-02 20:58 messages.log
305M 2009-09-02 20:58 everything.log

Updated by mihanson about 15 years ago

I don't know if that's the correct format. man logrotate.conf

Updated by cecil about 15 years ago

You may want to investigate those logs to see why they are growing so big. Something must be barking and causing your logs to grow.

Updated by uteck about 15 years ago

I had a lot of messages about not being able to start the backend, but this unit is only a frontend. I went through the Service Menu and set that up a long time ago.
I manually stopped the backend from running and that seems to have halted the growth of the log files.

messages.log
Sep 6 16:02:37 AtomicAnt mythbackend: :: Starting MythBackend [BKGD] > Running mythfilldatabase
Sep 6 16:02:37 AtomicAnt mythbackend: ./run: line 16: /usr/MythVantage/bin/initial_db_run: No such file or directory
Sep 6 16:02:38 AtomicAnt mythbackend: cannot open logfile /var/log/mythtv/mythbackend.log
Sep 6 16:02:38 AtomicAnt mythbackend: cannot open logfile; using stdout/stderr
Sep 6 16:02:38 AtomicAnt mythbackend: 2009-09-06 16:02:38.225 Using runtime prefix = /usr
Sep 6 16:02:38 AtomicAnt mythbackend: 2009-09-06 16:02:38.228 Empty LocalHostName.
Sep 6 16:02:38 AtomicAnt mythbackend: 2009-09-06 16:02:38.228 Using localhost value of AtomicAnt
Sep 6 16:02:38 AtomicAnt mythbackend: 2009-09-06 16:02:38.230 Configuration::Load - Error parsing: /home/mythtv/.mythtv/config.xml at line: 1 column: 1
Sep 6 16:02:38 AtomicAnt mythbackend: 2009-09-06 16:02:38.231 Configuration::Load - Error Msg: unexpected end of file
Sep 6 16:02:38 AtomicAnt mythbackend: 2009-09-06 16:02:38.252 New DB connection, total: 1
Sep 6 16:02:38 AtomicAnt mythbackend: 2009-09-06 16:02:38.267 Connected to database 'mythconverg' at host: 192.168.254.21
Sep 6 16:02:38 AtomicAnt mythbackend: 2009-09-06 16:02:38.269 Closing DB connection named 'DBManager0'
Sep 6 16:02:38 AtomicAnt mythbackend: 2009-09-06 16:02:38.271 Connected to database 'mythconverg' at host: 192.168.254.21
Sep 6 16:02:38 AtomicAnt mythbackend: 2009-09-06 16:02:38.278 New DB connection, total: 2
Sep 6 16:02:38 AtomicAnt mythbackend: 2009-09-06 16:02:38.279 Connected to database 'mythconverg' at host: 192.168.254.21
Sep 6 16:02:38 AtomicAnt mythbackend: 2009-09-06 16:02:38.285 Current Schema Version: 1214
Sep 6 16:02:38 AtomicAnt mythbackend: No setting found for this machine's BackendServerIP.
Sep 6 16:02:38 AtomicAnt mythbackend: Please run setup on this machine and modify the first page
Sep 6 16:02:38 AtomicAnt mythbackend: of the general settings.
Sep 6 16:02:38 AtomicAnt mythbackend: :: Starting MythBackend [BKGD] > Running mythfilldatabase

Also available in: Atom PDF