Re: sendmail and rbl blocking - generating statistics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Ryan Simpkins wrote:
On Wed, March 14, 2007 14:08, Will McDonald wrote (trimmed):
On 14/03/07, Ryan Simpkins <centos@xxxxxxxxxxxxxxxx> wrote:
Try doing a simple 'cat /var/log/maillog | grep -c check_relay'
You can avoid the unnecessary 'cat' by just passing the filename to grep directly:

# grep -c 'checK_relay.*spamhaus' /var/log/maillog
# grep -c 'checK_relay.*spamcop' /var/log/maillog
# grep -c 'checK_relay.*njabl' /var/log/maillog

Would probably be more efficient and faster, you can test with 'time' to verify
this. You're spawning one process 'grep', instead of three seperate processes,
'cat, 'grep' and 'grep' again.

Am I using time right to measure it?
No, you're timing the cat only.


# time cat /var/log/maillog | grep check_relay | grep -c njabl
8

real    0m0.299s
user    0m0.289s
sys     0m0.009s


Too short for useful measurement with these tools.


--

Cheers
John

-- spambait
1aaaaaaa@xxxxxxxxxxxxxxxx  Z1aaaaaaa@xxxxxxxxxxxxxxxx

Please do not reply off-list
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux