> -----Original Message----- > From: [email protected] [mailto:rsyslog- > [email protected]] On Behalf Of Dražen Kacar > Sent: Tuesday, November 16, 2010 1:57 PM > To: rsyslog-users > Subject: Re: [rsyslog] Huge pauses when writing to FIFO > > Rainer Gerhards wrote: > > On 11/15/2010 03:54 PM, Dražen Kačar wrote: > >> Configuration option would be perfect for my purposes. I'd just need > a > >> patch unless you intend to release a new version in the next few > days. > > > > I have attached a patch that *could* work. Unfortunately, I currently > do > > not have the time to really test it out. So I'd appreciate if you > could > > give it a try and report back your results. > > It doesn't work for me. In preparePipe() you forgot to use the variable > mode in the subsequent open(). I've fixed that, but it still doesn't > work.
I think I forgot to mention an important condition: by default, ompipe works in nonblocking mode. So you need to set it to blocking mode for the action in question. This is done via $OMPipeBlockingMode on in front of the action, like here: $OMPipeBlockingMode on local1.* |/opt/foo/my_named_pipe > Linux lsof can't show file descriptor flags and I don't know any other > way > to get the O_NONBLOCK flag from the kernel, so I'm inferring from the > behaviour. strace still shows 30 second sleep in select(). > > I suppose that the code from runtime/stream.c is being used no > and it has > unconditional non-blocking mode for STREAMTYPE_NAMED_PIPE. I don't know > enough about architecture to be able to write a correct patch for that. > > I'm not even sure I'm using ompipe module. I don't load it explicitely > in > the config file, version 5.6.0 doesn't have documentation for it, so I > wasn't even aware it existed before I've seen your patch. It is a built-in module that does not need to be loaded. There is a small set of core outputs that are always present, like omfwd, omfile and ompipe. There is no module-specific documentation for their functionality, because it is documented with the core functionality. > > In the configuration file I'm using FIFO like this: > > local1.* |/opt/foo/my_named_pipe > > And that seems to use the code from stream.c. I'm not aware of any > other > way to use a FIFO as a destination. you have probably looked into omfile, but since recently ompipe was extracted from it. The reason were problems with that xconsole pipe. > > > As a unrelated side-note, I have set up CentOS 5.5 in a VM and tried > to > > compile rsyslog from git there. The autotools version seems to be > very > > old. Is there any way to get 2.61 on that platform without building > from > > source (I want to be as close to a standard system as possible and so > > I'd like not to build too many different things...). > > I'm not aware of a repository with the newer autotools packages. I > didn't need them so far, so I wasn't looking. OK, thanks, so I probably need to dump the idea of working with a "normal" git environment there and will developed based on a release tarball. Rainer _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com

