On Fri, 2003-07-04 at 16:31, veryaner wrote: > hi everybody, > I need a module or something to show my list statics? is this posible? > I want to show, the user who send more mails, and that kind of things... > thanks in advanced > veryaner > > --
====== Beginning of script: mm_stats ====== #! /bin/bash # Run monthly stats on Meeting maker logs # - top 10 users of each list # - Number of attempted posts (per list) # - Total bytes sent (per list) # written by Jon Carnes, last modified on Sept 26, 2002 # # Mailman's log file to be examined for stats #POST=/home/mailman/logs/post POST=/var/log/mailman/post.1 # create temp file to collect stats TMPFILE=`mktemp /tmp/mm_stats.XXXXXX` || exit 1 LIST="`/var/mailman/bin/list_lists |awk '{print $1}' |sed -n '2,$p'`" for i in $LIST do echo "Stats from local Mailman list: $i" > $TMPFILE echo " " >> $TMPFILE echo -n " Starting: " >> $TMPFILE head -1 $POST |cut -f1-3 "-d " >> $TMPFILE echo -n " Ending: " >> $TMPFILE tail -1 $POST |cut -f1-3 "-d " >> $TMPFILE echo " ===" >> $TMPFILE echo -n "Total posts to the list: " >> $TMPFILE grep -i "post to $i " $POST |wc -l >> $TMPFILE echo -n "Total SUCCESSFUL posts to the list: " >> $TMPFILE grep -i "post to $i " $POST |grep success |wc -l >> $TMPFILE SIZ=`grep -i "post to $i" $POST|grep success|cut -f2 -d= |cut -f1 -d,` k=0; for j in $SIZ; do k=$(( j + k )); done echo " Total bytes" = $k >> $TMPFILE echo " " >> $TMPFILE echo "Top 10 posters to the list:" >> $TMPFILE grep -i "post to $i " $POST |cut -f 10 "-d " |sort |uniq -c \ |sort -bgr |head -10 >> $TMPFILE echo " " >> $TMPFILE # Mail the collected stats off to list admin and cc mailman user mail -s "Mailman Stats for List: $i" -c mailman $i-admin <$TMPFILE done # remove the temp file rm $TMPFILE ====== End of Script ====== ------------------------------------------------------ Mailman-Users mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ This message was sent to: [EMAIL PROTECTED] Unsubscribe or change your options at http://mail.python.org/mailman/options/mailman-users/archive%40jab.org