Re: [exim] Count connections

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Nigel Metheringham
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] Count connections
On Tue, 2005-03-01 at 12:10 -0500, Dennis Skinner wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Matthias Waffenschmidt wrote:
> | Why not just using exiwhat this way:
> |
> | exiwhat | grep 'handling incoming connection' | wc -l
> I mentioned that in my previous email, but was unsure how accurate it
> was since the docs mention issues with exiwhat on some systems.


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

> Yes, I could grep the config file for those options (I will probably do
> this for the short-term), but the whole thing seems hackish when exim
> already knows the answers I want. Perhaps a wishlist for a commandline
> option like exim -cc (count 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.

> 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. Actually you do know
which is the daemon if you write a pid file, but can we assume that?



    Nigel.
-- 
[ Nigel Metheringham           Nigel.Metheringham@??? ]
[ - Comments in this message are my own and not ITO opinion/policy - ]