Changes between Version 3 and Version 4 of howto/TransparantSpamStatus
- Timestamp:
- 07/29/09 12:36:31 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
howto/TransparantSpamStatus
v3 v4 1 1 {{{ 2 watch -n 1 ' 2 #(C)DatuX 2009 3 nice watch -n 1 ' 4 SAMPLE=60 5 START=`tail -$SAMPLE /home/system/dspam/system.log |head -1|egrep -o "^[0-9]+"` 6 NOW=`tail -1 /home/system/dspam/system.log|egrep -o "^[0-9]+"` 7 (( SPEED=(SAMPLE*60)/(NOW-START) )) 8 QUEUE=`/var/qmail2/bin/qmail-qstat|head -1|egrep -o "[0-9]+$"` 9 (( LAG=QUEUE/SPEED )) 2>/dev/null 10 3 11 uptime 12 echo "################### Inkomend #######################" 4 13 5 IP= 1.2.3.414 IP=91.189.102.7 6 15 HOLD=`netstat -nap|grep $IP:25|grep SYN_RECV|wc -l` 7 16 EST=`netstat -nap|grep $IP:25|grep ESTABLISHED|grep - | wc -l` 8 17 ACTIVE=`netstat -nap|grep $IP:25 | grep ESTABLISHED|grep -v -|wc -l` 9 18 (( TOTAL=HOLD+EST+ACTIVE )) 10 echo " Inkomende SMTP connecties naar $IP: $HOLD nieuw + $EST wachtend + $ACTIVE actief = $TOTAL"19 echo "Huidige inkomende SMTP connecties : $HOLD nieuw + $EST wachtend + $ACTIVE actief = $TOTAL" 11 20 12 echo -n "Connecties afgehandeld: " 13 grep ' from ' /var/log/qmail/qmail-smtpd/current |wc -l 21 CONNS=`grep ' from ' /var/log/qmail2/qmail-smtpd/current |wc -l` 22 DROPPED=`grep 'rblsmtpd:' /var/log/qmail2/qmail-smtpd/current | wc -l` 23 if [ "$DROPPED" ] && [ "$CONNS" ]; then 24 (( DROPPERC=(100*DROPPED)/CONNS )) 25 echo "Black list percentage : $DROPPERC %" 26 fi 14 27 15 # echo -n "Qmail status: " 16 # grep status: /var/log/qmail/qmail-smtpd/current |tail -1 28 echo "INKOMENDE QUEUE LENGTE : $QUEUE" 17 29 18 30 echo 19 echo Geblokkeerde mailservers: 20 tac /var/log/qmail/qmail-smtpd/current|grep rblsmtpd|head -5|tac|cut -f 3- -d" " 31 echo "In behandeling:" 32 ps faux|grep qmailr2|grep remote|grep -v grep 33 21 34 22 35 echo 23 echo -n "Laatste scan tijden: "; 24 grep TIMING /service/amavis/log/main/current |tail -10|egrep -o "[0-9]* ms"| tr "\n" "|" 25 echo 26 echo Huidige scan processen: 36 echo "################### Scanner #######################" 37 echo "Dspam input processen:" 27 38 ps ax|egrep "dspam" | grep -- "--user"|grep -v grep 28 39 29 40 echo 30 echo Laatst verwerkt door spamfilter:41 echo "Dspam laatste resultaten:" 31 42 tail -5 /home/system/dspam/system.log|cut -f 6-8 32 43 33 44 echo 34 echo Uitgaande mails: 45 echo "Huidige scansnelheid : $SPEED mails/minuut" 46 echo "Geschatte wachttijd : $LAG minuten." 47 48 echo 49 echo "################### Uitgaand #######################" 35 50 /var/qmail/bin/qmail-qstat 36 tac /var/log/maillog|grep "starting delivery"|head -5 |tac|cut -f7- -d" " 51 echo 52 tac /var/log/maillog|grep "starting delivery"|head -10 |tac|cut -f7- -d" " 37 53 38 sleep 139 54 ' 55 56 57 40 58 }}}