On Fri, 2006-12-29 at 17:34 -0600, Noel Jones wrote:
> >Is there any way to track how long each portion of the scan takes for a
> >message? It would be handy to know for each message how long the virus
> >scan took, how long the rbl checks take, how long FuzzyOCR takes... etc.
> 
> Log level 2 (in amavisd.conf) will give a breakdown of the 
> times.  Very likely 90% or more is spent in spamassassin,

Thanks for the suggestion. It looks like the time is split fairly evenly
on average between spamassassin and ClamAV.

Which makes me wonder, is there a performance benefit to running clamd
instead of having spamassassin call clamscan?

Bob

Here's some of the level 2 logs for your info.
Ignore the truncated statements. That's from a little script we have
that parses the log into a MySQL table.

# tail -f /var/log/amavis.log | grep TIMING
tail: /var/log/amavis.log: file truncated
Jan  2 15:04:08 amavis1.westmancom.com /usr/sbin/amavisd[4707]:
(04707-01) TIMING [total 9136 ms] - sql-prepare: 4 (0%), SMTP EHLO: 3
(0%), SMTP pre-MAIL: 1 (0%), mkdir tempdir: 0 (0%), create email.txt: 0
(0%), sql-connect: 2 (0%), lookup_sql: 2 (0%), SMTP pre-DA TA-flush: 1
(0%), SMTP DATA: 38 (0%), body_hash: 1 (0%), mkdir parts: 0 (0%),
lookup_sql: 1 (0%), mime_decode: 7 (0%), get-file-type 1: 8 (0%),
decompose_part: 2 (0%), get-file-type1: 6 (0%), parts_decode: 0 (0%),
AV-scan-1: 1722 (19%), lookup_sql: 2 (0%), lookup_s ql: 0 (0%), spam-wb-
list: 1 (0%), SA msg read: 1 (0%), SA parse: 3 (0%), SA check: 7314
(80%), update_cache: 1 (0%), save-to-local-m ailbox: 3 (0%), post-
do_spam: 0 (0%), deal_with_mail_size: 0 (0%), main_log_entry: 8 (0%),
update_snmp: 0 (0%), unlink-1-files: 0 (0 %), rundown: 0 (0%)
Jan  2 15:04:10 amavis1.westmancom.com /usr/sbin/amavisd[4706]:
(04706-01-2) TIMING [total 9276 ms] - lookup_sql: 3 (0%), SMTP pre-D
ATA-flush: 1 (0%), SMTP DATA: 38 (0%), body_hash: 0 (0%), lookup_sql: 2
(0%), mime_decode: 4 (0%), get-file-type1: 8 (0%), parts_dec ode: 0
(0%), AV-scan-1: 1683 (18%), lookup_sql: 2 (0%), lookup_sql: 1 (0%),
spam-wb-list: 1 (0%), SA msg read: 0 (0%), SA parse: 1 ( 0%), SA check:
7521 (81%), update_cache: 1 (0%), save-to-local-mailbox: 3 (0%), post-
do_spam: 0 (0%), deal_with_mail_size: 0 (0%), m ain_log_entry: 7 (0%),
update_snmp: 0 (0%), unlink-1-files: 0 (0%), rundown: 0 (0%)
tail: /var/log/amavis.log: file truncated
Jan  2 15:04:12 amavis1.westmancom.com /usr/sbin/amavisd[4706]:
(04706-01-3) TIMING [total 2390 ms] - lookup_sql: 8 (0%), SMTP pre-D
ATA-flush: 1 (0%), SMTP DATA: 89 (4%), body_hash: 4 (0%), lookup_sql: 1
(0%), mime_decode: 45 (2%), get-file-type4: 10 (0%), decompo se_part: 1
(0%), parts_decode: 0 (0%), AV-scan-1: 1678 (70%), lookup_sql: 2 (0%),
spam-wb-list: 1 (0%), update_cache: 1 (0%), deal_w ith_mail_size: 0
(0%), fwd-connect: 6 (0%), fwd-mail-from: 151 (6%), fwd-rcpt-to: 96
(4%), write-header: 2 (0%), fwd-data: 150 (6%),  fwd-data-end: 136 (6%),
fwd-rundown: 1 (0%), main_log_entry: 6 (0%), update_snmp: 0 (0%),
unlink-4-files: 1 (0%), rundown: 0 (0%)
tail: /var/log/amavis.log: file truncated
tail: /var/log/amavis.log: file truncated
Jan  2 15:04:17 amavis1.westmancom.com /usr/sbin/amavisd[4706]:
(04706-01-4) TIMING [total 5324 ms] - lookup_sql: 9 (0%), SMTP pre-DATA-
flush: 1 (0%), SMTP DATA: 34 (1%), body_hash: 0 (0%), lookup_sql: 2
(0%), mime_decode: 13 (0%), get-file-type3: 9 (0%), decompose_part: 0
(0%), parts_decode: 0 (0%), AV-scan-1: 1738 (33%), lookup_sql: 2 (0%),
lookup_sql: 1 (0%), lookup_sql: 1 (0%), spam-wb-list: 1 (0%), SA msg
read: 1 (0%), SA parse: 2 (0%), SA check: 3470 (65%), update_cache: 1
(0%), fwd-connect: 10 (0%), fwd-mail-from: 1 (0%), fwd-rcpt-to: 2 (0%),
write-header: 2 (0%), fwd-data: 2 (0%), fwd-data-end: 13 (0%), fwd-
rundown: 1 (0%), post-do_spam: 0 (0%), deal_with_mail_size: 0 (0%),
main_log_entry: 7 (0%), update_snmp: 0 (0%), unlink-3-files: 0 (0%),
rundown: 0 (0%)
tail: /var/log/amavis.log: file truncated
Jan  2 15:04:22 amavis1.westmancom.com /usr/sbin/amavisd[4706]:
(04706-01-5) TIMING [total 4320 ms] - lookup_sql: 2 (0%), SMTP pre-DATA-
flush: 1 (0%), SMTP DATA: 38 (1%), body_hash: 0 (0%), lookup_sql: 2
(0%), mime_decode: 4 (0%), get-file-type1: 8 (0%), decompose_part: 0
(0%), parts_decode: 0 (0%), AV-scan-1: 1677 (39%), lookup_sql: 2 (0%),
lookup_sql: 1 (0%), lookup_sql: 1 (0%), spam-wb-list: 1 (0%), SA msg
read: 0 (0%), SA parse: 1 (0%), SA check: 2493 (58%), update_cache: 0
(0%), fwd-connect: 5 (0%), fwd-mail-from: 1 (0%), fwd-rcpt-to: 12 (0%),
write-header: 2 (0%), fwd-data: 0 (0%), fwd-data-end: 62 (1%), fwd-
rundown: 1 (0%), post-do_spam: 0 (0%), deal_with_mail_size: 0 (0%),
main_log_entry: 6 (0%), update_snmp: 0 (0%), unlink-1-files: 0 (0%),
rundown: 0 (0%)
tail: /var/log/amavis.log: file truncated
Jan  2 15:04:28 amavis1.westmancom.com /usr/sbin/amavisd[4704]:
(04704-02) TIMING [total 7858 ms] - SMTP EHLO: 2 (0%), SMTP pre-MAIL: 1
(0%), lookup_sql: 10 (0%), lookup_sql: 14 (0%), lookup_sql: 2 (0%),
lookup_sql: 2 (0%), lookup_sql: 2 (0%), lookup_sql: 14 (0%), lookup_sql:
2 (0%), lookup_sql: 2 (0%), lookup_sql: 2 (0%), lookup_sql: 2 (0%),
lookup_sql: 2 (0%), SMTP pre-DATA-flush: 1 (0%), SMTP DATA: 1 (0%),
body_hash: 1 (0%), lookup_sql: 2 (0%), lookup_sql: 1 (0%), lookup_sql: 1
(0%), lookup_sql: 1 (0%), lookup_sql: 1 (0%), lookup_sql: 1 (0%),
lookup_sql: 1 (0%), lookup_sql: 1 (0%), lookup_sql: 1 (0%), lookup_sql:
1 (0%), lookup_sql: 1 (0%), mime_decode: 9 (0%), get-file-type1: 8 (0%),
decompose_part: 1 (0%), parts_decode: 0 (0%), AV-scan-1: 1686 (21%),
lookup_sql: 3 (0%), lookup_sql: 1 (0%), lookup_sql: 1 (0%), lookup_sql:
2 (0%), lookup_sql: 0 (0%), lookup_sql: 0 (0%), lookup_sql: 2 (0%),
lookup_sql: 0 (0%), lookup_sql: 0 (0%), lookup_sql: 2 (0%), lookup_sql:
0 (0%), lookup_sql: 0 (0%), lookup_sql: 2 (0%), lookup_sql: 0 (0%),
lookup_sql: 0 (0%), lookup_sql: 2 (0%), lookup_sql: 0 (0%), lookup_sql:
0 (0%), lookup_sql: 1 (0%), lookup_sql: 0 (0%), lookup_sql: 2 (0%),
lookup_sql: 0 (0%), lookup_sql: 0 (0%), lookup_sql: 2 (0%), lookup_sql:
0 (0%), lookup_sql: 0 (0%), lookup_sql: 2 (0%), lookup_sql: 0 (0%),
lookup_sql: 0 (0%), lookup_sql: 2 (0%), lookup_sql: 0 (0%), lookup_sql:
0 (0%), spam-wb-list: 1 (0%), SA msg read: 1 (0%), SA parse: 1 (0%), SA
check: 5339 (68%), update_cache: 1 (0%), save-to-local-mailbox: 11 (0%),
fwd-connect: 4 (0%), fwd-mail-from: 1 (0%), fwd-rcpt-to: 123 (2%),
write-header: 2 (0%), fwd-data: 0 (0%), fwd-data-end: 509 (6%), fwd-
rundown: 1 (0%), post-do_spam: 1 (0%), save-to-local-mailbox: 5 (0%),
deal_with_bad_headers: 3 (0%), deal_with_mail_size: 0 (0%),
main_log_entry: 45 (1%), update_snmp: 0 (0%), unlink-2-files: 0 (0%),
rundown: 0 (0%)
tail: /var/log/amavis.log: file truncated
Jan  2 15:04:29 amavis1.westmancom.com /usr/sbin/amavisd[4706]:
(04706-01-6) TIMING [total 7815 ms] - lookup_sql: 23 (0%), SMTP pre-
DATA-flush: 1 (0%), SMTP DATA: 23 (0%), body_hash: 0 (0%), lookup_sql: 2
(0%), mime_decode: 14 (0%), get-file-type3: 10 (0%), decompose_part: 1
(0%), parts_decode: 0 (0%), AV-scan-1: 1695 (22%), lookup_sql: 2 (0%),
lookup_sql: 1 (0%), lookup_sql: 1 (0%), spam-wb-list: 1 (0%), SA msg
read: 1 (0%), SA parse: 2 (0%), SA check: 5445 (70%), update_cache: 1
(0%), deal_with_mail_size: 0 (0%), fwd-connect: 17 (0%), fwd-mail-from:
105 (1%), fwd-rcpt-to: 11 (0%), write-header: 2 (0%), fwd-data: 2 (0%),
fwd-data-end: 443 (6%), fwd-rundown: 1 (0%), main_log_entry: 7 (0%),
update_snmp: 0 (0%), unlink-3-files: 0 (0%), rundown: 0 (0%)
Jan  2 15:04:32 amavis1.westmancom.com /usr/sbin/amavisd[4704]:
(04704-02-2) TIMING [total 4161 ms] - lookup_sql: 12 (0%), SMTP pre-
DATA-flush: 1 (0%), SMTP DATA: 39 (1%), body_hash: 2 (0%), lookup_sql: 2
(0%), mime_decode: 15 (0%), get-file-type3: 9 (0%), decompose_part: 1
(0%), parts_decode: 0 (0%), AV-scan-1: 1694 (41%), lookup_sql: 2 (0%),
lookup_sql: 1 (0%), lookup_sql: 1 (0%), spam-wb-list: 1 (0%), SA msg
read: 1 (0%), SA parse: 3 (0%), SA check: 2242 (54%), update_cache: 1
(0%), fwd-connect: 9 (0%), fwd-mail-from: 1 (0%), fwd-rcpt-to: 36 (1%),
write-header: 2 (0%), fwd-data: 2 (0%), fwd-data-end: 74 (2%), fwd-
rundown: 3 (0%), post-do_spam: 1 (0%), deal_with_mail_size: 0 (0%),
main_log_entry: 7 (0%), update_snmp: 0 (0%), unlink-3-files: 1 (0%),
rundown: 0 (0%)


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to