Changes between Version 3 and Version 4 of howto/TransparantSpamStatus


Ignore:
Timestamp:
07/29/09 12:36:31 (13 years ago)
Author:
Edwin Eefting
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • howto/TransparantSpamStatus

    v3 v4  
    11{{{
    2 watch -n 1 '
     2#(C)DatuX 2009
     3nice 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
    311        uptime
     12        echo "################### Inkomend #######################"
    413
    5         IP=1.2.3.4
     14        IP=91.189.102.7
    615        HOLD=`netstat -nap|grep $IP:25|grep SYN_RECV|wc -l`
    716        EST=`netstat -nap|grep $IP:25|grep ESTABLISHED|grep - | wc -l`
    817        ACTIVE=`netstat -nap|grep $IP:25 | grep ESTABLISHED|grep -v -|wc -l`
    918        (( 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"
    1120
    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
    1427
    15 #       echo -n "Qmail status: "
    16 #       grep status: /var/log/qmail/qmail-smtpd/current |tail -1
     28        echo "INKOMENDE QUEUE LENGTE              : $QUEUE"
    1729
    1830        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
    2134
    2235        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:"
    2738        ps ax|egrep "dspam" | grep -- "--user"|grep -v grep
    2839
    2940        echo
    30         echo Laatst verwerkt door spamfilter:
     41        echo "Dspam laatste resultaten:"
    3142        tail -5 /home/system/dspam/system.log|cut -f 6-8
    3243
    3344        echo
    34         echo Uitgaande mails:
     45        echo "Huidige scansnelheid : $SPEED mails/minuut"
     46        echo "Geschatte wachttijd  : $LAG minuten."
     47
     48        echo
     49        echo "################### Uitgaand #######################"
    3550        /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" "
    3753
    38         sleep 1
    3954'
     55
     56
     57
    4058}}}