SliTaz SliTaz Forum

You are not logged in.

#1 2012-10-20 17:17:32

llev
Member
Registered: 2011-12-09
Posts: 568

Keeping old /var/log/messages

Hi,

Sometimes my laptop freezes, and I have to shutdown with the power button. I would like to investigate the problem,  but when I boot again the old /var/log/messages is replaced by the new one. Is there a way to keep old versions, just as it is for /var/log/boot.log?

Thanks.

edit: this is a harddisk install!

Offline

#2 2012-11-04 06:47:58

gdesilva
Member
Registered: 2011-04-07
Posts: 419

Re: Keeping old /var/log/messages

Previous messages file is saved as messages.0

Offline

#3 2012-11-13 18:41:34

llev
Member
Registered: 2011-12-09
Posts: 568

Re: Keeping old /var/log/messages

You are right. But one level of backup is not enough, because /var/log/messages is flooded by those udev errors.

For example, today there remains only 19 lines of my previous session messages in messages.0 . The remaining 708 are from today (as well as all 700+ lines of /var/log/messages).

So I'd need either a means to keep more incremental backups, or a means to filter out udev errors before they reach the log. Or both!

Thanks in advance for any hint or solution.

Offline

#4 2012-11-13 20:08:19

bellard
Administrator
Registered: 2011-03-28
Posts: 657

Re: Keeping old /var/log/messages

sed -i 's/SYSLOGD_ROTATED_SIZE=.*/SYSLOGD_ROTATED_SIZE="4096 -b 50"/' /etc/rcS.conf

Offline

#5 2012-11-14 20:12:17

llev
Member
Registered: 2011-12-09
Posts: 568

Re: Keeping old /var/log/messages

Thanks a lot! 50 might be too much though ;-)

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 7 queries executed - Memory usage: 1.53 MiB (Peak: 1.77 MiB) ]