I am a novice linux user and I have inherited a RHEL6 server that is acting as a syslog-ng server. My problem is the boot.log is growing leaps and bounds from what appear to be the entries for the firewall going into the boot.log rather than the syslog messages file.

My first concern is the absolutely massive size of the boot.log. What should be a very small file is over 8.1 GB and growing. I would like to rotate it or truncate it if need be. I read several items that indicate using logrotate is not appropriate for RHEL6. Is there another way to have this log rotate? My biggest fear is the server will be rebooted one day but fail due to this massive log.


  • Does the server have an external drive. Current thought is move the file off the server, delete the copy in the server, then compare the file over a smaller window if time – Ramhound Sep 13 '13 at 19:34
  • It's a virtual machine, can potentially copy the file to a different partition. – aries1564 Sep 14 '13 at 4:12

I suspect your hypothesis is wrong - logrotate works fine (and is installed by default) in RHEL6 - see here for official documentation. There would be alternative ways to rotate the log file (eg manually move it, touch the file and restart the service writing to it - probably syslogd or rsyslogd), but logrotate is the tool designed for the job. If you provide links to the discussion I might be able to clarify or debunk it - nothing came up in a quick Google search. (It may be that log entries can go missing if logrotate is invoked with certain parameters or somesuch, but the solution is to tweek the way logrotate does the rotation).

Another thing to do is target the cause of the problem, and move the writing of the problem log to another file - normally by editing /etc/rsyslog.conf (or /etc/syslog.conf) and restarting it.

| improve this answer | |
  • rhn.redhat.com/errata/RHBA-2011-1673.html * Previously, the rsyslog daemon included /var/log/boot.log in the /etc/logrotate.d/syslog file. The rotation caused a new boot.log file to be created with zero length, while a date was appended to the old one. Eventually, after a certain number of rotations, the boot.log data got lost. With this update, rotation is no longer used for /var/log/boot.log. (BZ#683537) – aries1564 Sep 16 '13 at 19:52
  • If your boot.log file is 8 gigs, this is the least of your problems. Moving the logging which is going into boot.log would solve your problem, otherwise using rotated is the best option - I guess if you were really worried about retaining the initial information on boot you could simply copy this file to another file after the system boots, eg adding "cp /var/log/boot.log /var/log/boot-initial.log" before "exit 0" in /etc/rc.local – davidgo Sep 16 '13 at 23:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.