Re: [exim] Count connections

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Nigel Metheringham
CC: exim-users
Sujet: Re: [exim] Count connections
On Tue, 1 Mar 2005, Nigel Metheringham wrote:

> Almost any method for getting this data is seriously subject to race
> conditions - particularly on any server busy enough for this information
> to matter.


Absolutely! Even in the single daemon process there is scope for
"fuzziness". For example, when an accepting process finishes, it closes
the connection, but the daemon does not adjust its count until it
notices that the child process has ended. (A recent bugfix made it check
for completed processes *before* using the count to check new arrivals.)
So at best the count is approximate in the sense that the daemon's count
may not agree with the TCP/IP stack's number of active connections.

> Only the running daemon has the count that is accurate (in the sense of
> its the one that will be used to make connection acceptance decisions
> on). Its going to be difficult to pull this out. You also need to be
> aware that getting a lot of data using exiwhat is very difficult -
> signal handlers are very limited.


Yup.

> > While you are in there, an option to exiwhat that only outputs the
> > connection count would be appreciated :)
> Can't be done without making an entirely different communication between
> exiwhat and exim - you are just sending a signal. I guess you could
> signal everything and just filter the output.


My best suggestion is for the daemon to put the info in its exiwhat
output, which is trivial enough to do.


-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book