[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 273
  • Last Modified:

How do I make sure event are written immediately and not buffered in Centos 5.x

I believe that Centos buffers logs for many services (it might be the service itself, I don't know) and I want to make sure that when Apache sees an error it is written right away, the same with sshd,e tc.

Is there a way to change the buffering settings?
0
rduval
Asked:
rduval
  • 2
1 Solution
 
mccrackyCommented:
Assuming you have the ext3 file system, you are going to be looking at the "commit" interval.  By default, it is set to sync data to the disk every five (5) seconds.  

You can change that in /etc/fstab for partitions that aren't root, but need to add the option to the kernel line (in GRUB) for the root partition.  

You probably also should read this:
http://www.westnet.com/~gsmith/content/linux-pdflush.htm
0
 
rduvalAuthor Commented:
What would that line be in GRUB (in the .conf I presume?)
0
 
mccrackyCommented:
to change it off the default 5 seconds, it should just be appending "rootflags=commit=3" or the like to the end of the kernel line.  See, for example: http://blog.loxal.net/2008/01/tuning-ext3-for-performance-without.html
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now