Solved

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

Posted on 2011-02-28
3
257 Views
Last Modified: 2012-05-11
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
Comment
Question by:rduval
  • 2
3 Comments
 
LVL 12

Expert Comment

by:mccracky
ID: 35008144
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
 

Author Comment

by:rduval
ID: 35010832
What would that line be in GRUB (in the .conf I presume?)
0
 
LVL 12

Accepted Solution

by:
mccracky earned 500 total points
ID: 35011144
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now