Re: mailq numbers

This is a discussion on Re: mailq numbers within the mailing.postfix.users forums, part of the Mail Servers and Related category; On Mon, Jan 26, 2004 at 01:26:21PM +0100, Magnus B?ck wrote: > Jacques Botha wrote: > > &...


Go Back   Usenet Forums > Mail Servers and Related > mailing.postfix.users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-27-2004
Rob Chanter
 
Posts: n/a
Default Re: mailq numbers

On Mon, Jan 26, 2004 at 01:26:21PM +0100, Magnus B?ck wrote:
> Jacques Botha wrote:
>
> >Is their any fast way of getting the number of messages in the queue ? The
> >emphasis is on fast.

>
> cd /var/spool/postfix
> find active deferred incoming maildrop bounce hold -type f | wc -l
>
> Adjust queue directories to taste.
>


On Solaris at least, that can be messy when queue files move or
disappear in the middle of the process, which can make it inconvenient
to include in scripts. On large queues it's completely normal for
Postfix to go about its business and deliver mail while you're running
find.

Ignoring stderr from find will probably give you a close enough
approximation for monitoring purposes.

find <queues> -type f 2>/dev/null | wc -l

or

for i in <queues>
do
printf %-10s $i
find $i -type f 2>/dev/null | wc -l
done

cheers
rob c
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:04 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0