OS trashed my space with pointless log files. :(


9 posts
by redhawk » Sat Dec 22, 2012 7:10 pm
It seems that after several months of use I have managed to trash my entire 8GB memory card with many large files in /var/log/
This has resulting in weird behaviour such as host lookup problems which in turn broke my radio streaming app:(

rw-r----- 1 root adm 981771445 Dec 22 18:32 debug
-rw-r----- 1 root adm 713773178 Dec 13 06:25 debug.1
-rw-r----- 1 root adm 982151679 Dec 22 18:32 kern.log
-rw-r----- 1 root adm 730301951 Dec 13 06:25 kern.log.1
-rw-r----- 1 root adm 982569969 Dec 22 18:36 syslog
-rw-r----- 1 root adm 733082184 Dec 13 06:25 syslog.1

In the interest of protecting my already well used Kingston Micro-SD memory card how can I prevent debug, kern.log and syslog from being written??

Richard S.
User avatar
Posts: 3519
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1
by rgh » Sat Dec 22, 2012 8:11 pm
The file /etc/rsyslog.conf controls what messages get logged to which files, on raspbian at least. You might simply need to comment relevant lines in that file. However, that's a lot of logging given that the timestamps on the current and '.1' previous files only differ by 9 days. You might be better off looking in the files (don't try and open in a editor, just do "more /var/log/kern.log" and press space to page down the file, 'q' to quit, for example. Maybe the log entries will point you at some other problem you need to resolve rather than just hiding it by turning off logging.
Posts: 220
Joined: Fri Nov 25, 2011 3:53 pm
by redhawk » Sat Dec 22, 2012 9:50 pm
I've found the program that's been filling up my memory card it's mocp (Music On Console).
When using the default Pi audio output there's no problem but as soon as I tell it to use a different audio device and it doesn't matter which (config => AlsaDevice = "hw:1,0") it goes mental.

All 3 log files contain the same following text:
Dec 22 21:40:57 raspberrypi kernel: [ 119.929580] delay: estimated 0, actual 221
Dec 22 21:40:57 raspberrypi kernel: [ 119.937578] delay: estimated 0, actual 221
Dec 22 21:40:57 raspberrypi kernel: [ 119.945578] delay: estimated 0, actual 221
Dec 22 21:40:57 raspberrypi kernel: [ 119.964586] delay: estimated 0, actual 221
Dec 22 21:40:57 raspberrypi kernel: [ 119.972582] delay: estimated 0, actual 220
Dec 22 21:40:57 raspberrypi kernel: [ 119.980580] delay: estimated 0, actual 220
Dec 22 21:40:57 raspberrypi kernel: [ 119.988593] delay: estimated 0, actual 221
Dec 22 21:40:57 raspberrypi kernel: [ 119.996592] delay: estimated 0, actual 221
Dec 22 21:40:57 raspberrypi kernel: [ 120.004592] delay: estimated 0, actual 221
Dec 22 21:40:57 raspberrypi kernel: [ 120.012587] delay: estimated 0, actual 220
Dec 22 21:40:57 raspberrypi kernel: [ 120.020592] delay: estimated 0, actual 220
Dec 22 21:40:57 raspberrypi kernel: [ 120.039594] delay: estimated 0, actual 221
Dec 22 21:40:57 raspberrypi kernel: [ 120.047594] delay: estimated 0, actual 221
Dec 22 21:40:57 raspberrypi kernel: [ 120.055600] delay: estimated 0, actual 221
Dec 22 21:40:57 raspberrypi kernel: [ 120.063603] delay: estimated 0, actual 220
Dec 22 21:40:57 raspberrypi kernel: [ 120.071604] delay: estimated 0, actual 220
Dec 22 21:40:57 raspberrypi kernel: [ 120.079596] delay: estimated 0, actual 221
Dec 22 21:40:57 raspberrypi kernel: [ 120.087603] delay: estimated 0, actual 221
Dec 22 21:40:57 raspberrypi kernel: [ 120.095600] delay: estimated 0, actual 221

I honestly don't know what to make it of it the logs doesn't actually contain any useful information and I want it to stop fill up my memory card.
At the moment I have replaced the logs files with symbolic links to /dev/null which seems to done the trick for now. :lol:

Is this a bug in mocp or it's causing some weird trigger elsewhere in the OS??

Richard S.
User avatar
Posts: 3519
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1
by redhawk » Fri Jan 18, 2013 11:47 am
Does anyone know the origins of these error messages??
I did some searching and found other users complaining of similar problems with other Intel based Linux distros e.g.
http://mailman.alsa-project.org/piperma ... 51345.html
http://comments.gmane.org/gmane.linux.usb.general/54097

To add to this mystery if I play audio via my USB audio dongle using qmmp rather that Music On Console this doesn't trash my OS.

Richard S.
User avatar
Posts: 3519
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1
by Mortimer » Fri Jan 18, 2013 11:54 am
User avatar
Posts: 719
Joined: Sun Jun 10, 2012 3:57 pm
by Mortimer » Fri Jan 18, 2013 11:55 am
User avatar
Posts: 719
Joined: Sun Jun 10, 2012 3:57 pm
by Bob_Tee » Tue Mar 19, 2013 9:24 am
While the root causes above need to be addressed there is another time bomb ticking if your pi is not left powered up 24/7. The log files should get saved, compressed, cycled and deleted. This happens overnight and I thought I had sorted it all a month ago. But now I realise that when I just use the pi during daytime and power it off overnight the log files are still slowly growing in size. So I either need to leave it on 24/7 or at least a couple of times a week or fiddle with the logging frequency or time to ensure that the back-up compress and cycling occurs as it would in a normal always on situation. With normal logging and a good sized card this will pass unnoticed for many months. A tight card or these soundcard generated errors highlights the problem of intermittent use.

Bob

G3WKW
Posts: 7
Joined: Sun Mar 04, 2012 12:23 pm
by plugwash » Tue Mar 19, 2013 4:05 pm
That's what anacron is for......
Forum Moderator
Forum Moderator
Posts: 2389
Joined: Wed Dec 28, 2011 11:45 pm
by Bob_Tee » Tue Mar 19, 2013 6:36 pm
Thank you, it looks like that is what is I needed. Time will tell! Perhaps that should be part of the package.
Posts: 7
Joined: Sun Mar 04, 2012 12:23 pm