The default behaviour of syslogd is to keep pipes open until no longer needed (I believe, based on man pages and experience). This can be undesired if you wish to have any types of syslog messages transmitted to an alphanumeric pager, because it can take a long time (in one case here, about twelve hours) for the pipe to be closed, and therefore the page to be sent. (in this case). I poked around in the source for syslogd and think I have come to a compatible change, that closes the pipe after each log entry is written. I realize that this is an inefficient use of system resources; but it was the easiest way to achieve my desired result. How-To-Repeat: Setup a logging definition to log to a pipe.
As Joseph Stein wrote: > The default behaviour of syslogd is to keep pipes open until > no longer needed (I believe, based on man pages and experience). This was intention. Actually, the process is being shut down after some (rather long, i think 2 x `mark interval', i.e. 40 minutes by default) time. > This can be undesired if you wish to have any types of syslog messages > transmitted to an alphanumeric pager, because it can take a long time > (in one case here, about twelve hours) for the pipe to be closed, and > therefore the page to be sent. (in this case). > > I poked around in the source for syslogd and think I have come to > a compatible change, that closes the pipe after each log entry is > written. > > I realize that this is an inefficient use of system resources; but > it was the easiest way to achieve my desired result. This was exactly the reason why i didn't implement it this way (unlike it is done on SGI IRIX, where this idea has been taken from). syslog messages are always just one line, so i thought it would be reasonable that the program these messages are being piped into could handle the case of `important' messages itself well enough. I realize that this is a compromise, but generally closing the pipe after each message is IMHO more unacceptable, since you can't workaround the resource wastage in the filter program (think of logging events that might happen for a short period with thousands of events per second -- nothing that hasn't been seen yet). You can however work around the pipe not being closed in the filter program -- in the simplest case, wrap it with a shell script that reads exactly one line of input, and then exits. (SGI IRIX apparently didn't care about resource wastage. I think we should.) Unless somebody seriously disagrees with my opinion here, i suggest to close the PR without further action. If someone suggests a manpage addition that enlightens the above reasoning (perhaps with some examples), i absolutely don't mind adding this. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
Hi, Joerg! Could you please close this PR? I don't see any need for it to stay open; and I've written a work around in the Qpage program now, so it's a moot point. And, the explanation you gave made a lot of sense, too. Thanks, joe
State Changed From-To: open->closed Documentation slightly improved in rev 1.7 of syslog.conf(5). Apart from this, the way it works is a feature.