Re: [Nagios-devel] Possible patch to cure CGI's not finding data

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Possible patch to cure CGI's not finding data

Post by Guest »

Andreas Ericsson wrote:
>>>
>>>
>>
>> I tried a program which I meant to attach to this mail that I deleted
>> by mistake as I was composing this mail, that fopen'd a file, wrote a
>> character at a time and either fclosed at the end, or fsync'd after
>> each character, or sync'd after each character. it wrote 1MB worth of
>> characters to the file.
>>
>
> Ahmm... That's not really such a great test, tbh. Try the write throughput
> with a testing tool for it and then divide the size of the file to be
> synced with the actual write speed of the disk and you'll get something
> rather close to the cost of a single fsync call for a particular file.
>

ah okay, thanks for the reply, I enjoy reading replies from experienced
folk, I learn from them.

>>
>> not sure how useful this really is to get an idea, but sync is clearly
>> to be avoided as you mentioned. what do you guys make of the
>> difference between fsync and no fsync in relation to nagios?
>>
>
> fsync() isn't needed when using a sane file system. When using an insane
> one, there are no guarantees that fsync() works anyway, so why use it?
>

it's not needed on a sane filesystem because another process trying to
read a file not completely sync'd will still see the latest content?
agree about the NFS issue, read a little about it's problems, and if
fsync isn't going to solve its problems, I see your point about not
using it.

if I'm not mistaken this patch was committed already? was there a reason
it was so easily accepted?





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked