OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Avg. size per e-mail?

From: Andrej Ricnik-Bay (andrej.groupsgmail.com)
Date: Thu May 04 2006 - 16:48:40 CDT


On 5/5/06, Michael Monnerie <michael.monnerieit-management.at> wrote:
> Hello all,
>
> I've just been asked what's the avg. size of an e-mail, and a quick
> calculation gave me 223KB/e-mail. At the first view, this sounds a lot,
> as normal text mail is 5-10KB max, but then there are those mails with
> pictures, porn .pps, and so on, so I guess it could be reasonable. Does
> somebody else have numbers here?
For the period of retained logs ...

awk -F= '/size/ { for(i=1;i<=NF;i++){if(index($i,"size")
!=0){size+=substr($(i+1),0,index($(i+1),",")-1);count++ }}} END{print
"number of messages: "count;print "Average size: "size/count}' syslog*
number of messages: 2302263
Average size: 56206.2

Cheers,
Andrej

P.S.: The awk in solaris 9 sucks :} ... the gawk-variant is much nicer
and easier to read ;}
awk -F"[ =,]" ' /size=/ {for (i=1; i<NF;i++){if( $i ~
"size"){size+=$(i+1);count++}}} END{print "number of messages:
"count;print "Average size: "size/count}' syslog*

--
Please don't top post, and don't use HTML e-Mail :} Make your quotes concise.

http://www.american.edu/econ/notes/htmlmail.htm