Best way to measure sendmail queue depth?

Julian Field MailScanner at ecs.soton.ac.uk
Mon Jun 19 17:37:37 IST 2006



Stephen Swaney wrote:
> Absolutely. That's why I recommend running:
>
> find /var/spool/mqueue.in -mmin +120 -exec ls -l {} \; | more
>   
If you are doing this frequently, or expect to get quite a lot of files 
listed, then this will be faster:
find /var/spool/mqueue.in -mmin +120 -print | xargs ls -l | more
as it will run the fewest "ls" processes possible, whereas the previous 
version will run 1 "ls" for each file output.

Using xargs makes a huge difference when you are doing an operation on a 
lot of files using your "find" command.

-- 
Julian Field
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store
Professional Support Services at www.MailScanner.biz
MailScanner thanks transtec Computers for their support

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.



More information about the MailScanner mailing list