Solved

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

Posted on 2011-02-28
3
268 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

717 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