Large Log files

stormwalkerza

Senior Member
Joined
Jun 10, 2005
Messages
521
Im new to *nix so be kind :p

I have ubuntu server running on a system and its generating huge log files

kern.log - 24gb
debug - 24gb
kern.log.l - 18gb
debug.l - 18gb
syslog.l - 9gb
syslog - 6gb

Im fine with the syslog size, but the rest just keep growing.

Is there something wrong somewhere ? what can i do elst it takes up all the space then essentially everything stalls till i remove some .l log files

Any guidance would be appreciated. I did google, but seems log is to plain a phrase

Tnks !!
 

davemc

Executive Member
Joined
Apr 8, 2009
Messages
6,518
/me buys MyWorld a beer.
If you can't beat em .. edumacate em.
 

stormwalkerza

Senior Member
Joined
Jun 10, 2005
Messages
521
Thanx !! will see about doing that. Any reason the log files will grow so quickly? 24gb ones are now 28gb, and its not heavilly used, mainly a mysql dabase
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
12,478
You somewhere have something running in debug mode and something causing kernel warning/error messages.

By default Ubuntu will already have logrotate set up to 1 day, which is fine. Instead of working around the problem, how about you start parsing those log files and see what the real problem is, and try to reduce the error and warning messages written to those files. There is probably a real problem, or just a tiny problem causing you a big problem.

I would start out to take the lines in the log files and count which ones are the same once you remove the date/time part. Work from resolving the biggest problem to the smallest and in no time those files will stop growing that much.

Personally, I doubt its mysql writing to the kernel and debug log files, in fact mysql usually writes to its own files, and if you have full query logging on, I hope you have a good reason for that, one should only have slow query logging turned on in mysql because those are the ones you need to fix if you have mysql problems.
 
Top