Re: [EXIM] Queue information

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Philip Hazel
日付:  
To: hamster
CC: exim-users
題目: Re: [EXIM] Queue information
On Wed, 11 Nov 1998 hamster@??? wrote:

> Can anyone think of an elegant way of checking how many items are in
> the queue (and how many are locked for delivery) other than counting
> how many *-J and *-D/H files there are?


The information isn't anywhere else, so that's what you have to do.
However, counting *-J files isn't strictly correct. If Exim or your
system has crashed, there may be *-J files left over - that's what they
are for. The only valid way to check for locking for delivery is to open
the *-D file for writing and try to get an exclusive fcntl() lock on it.
Of course, this creates a small chance that you will interfere with
Exim, should it be trying to get the lock itself just at that time.
Counting *-J files might be good enough for your purpose.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



--
*** Exim information can be found at http://www.exim.org/ ***