Re: [exim-dev] Logging to a pipe

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Graeme Fowler
CC: exim-dev
Subject: Re: [exim-dev] Logging to a pipe
On Wed, 1 Aug 2007, Graeme Fowler wrote:

> It struck me that if Exim was able to log to a pipe - i.e. send the
> output it normally puts in the various other logs out to a child process
> via a pipe - that we'd greatly extend the functionality and availability
> of real-time stats packages which can monitor Exim and spit out graphs,
> reports, alerts and so on.


But you can already "tail" the main log file to achieve this in as near
real-time as you like. That's how eximon works.

> The way Exim spins off and reaps child processes - for deliveries and so
> on - means that they themselves write to the various logfiles.


Exactly ... and rely on the operating system to keep it all under
control and not intermingle the data from the different writes by the
different processes. The OS does this just fine. With any other
hand-driven technique, complicated locking would no doubt be needed.

> As an adjunct to this... if the main/panic/reject logs were made FIFOs
> instead, would that gain us anything (and I suspect the answer is "only
> if you can guarantee something is on the other side of them").


Indeed, and I'm not sure if the same kind of interlocking would occur -
it might, I just don't know.

-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book