On Fri, Nov 07, 2008 at 04:26:54PM -0600, Gerald V. Livingston II wrote:

> I seldom have to deal with REALLY large queues but I use this I hacked 
> up real quick to see if anything is starting to build up:
> 
> #!/bin/bash
> echo ACTIVE
> echo
> find /var/spool/postfix/active/. ! -name . ! -name '?' -print |wc -l
> echo
> echo DEFERRED
> echo
> find /var/spool/postfix/deferred/. ! -name . ! -name '?' -print |wc -l
> echo
> echo BOUNCE
> echo
> find /var/spool/postfix/bounce/. ! -name . ! -name '?' -print |wc -l
> echo
> echo INCOMING
> echo
> find /var/spool/postfix/incoming/. ! -name . ! -name '?' -print |wc -l
> echo
> echo HOLD
> echo
> find /var/spool/postfix/hold/. ! -name . ! -name '?' -print |wc -l

Yes, this is essentially optimal. And indeed avoiding "-type f" is much
faster than performing a stat() or lstat() on each and every file.

-- 
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:[EMAIL PROTECTED]>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.

Reply via email to