{{{ #(C)DatuX 2009 nice watch -n 1 ' SAMPLE=60 START=`tail -$SAMPLE /home/system/dspam/system.log |head -1|egrep -o "^[0-9]+"` NOW=`tail -1 /home/system/dspam/system.log|egrep -o "^[0-9]+"` (( SPEED=(SAMPLE*60)/(NOW-START) )) QUEUE=`/var/qmail2/bin/qmail-qstat|head -1|egrep -o "[0-9]+$"` (( LAG=QUEUE/SPEED )) 2>/dev/null uptime echo "################### Inkomend #######################" IP=91.189.102.7 HOLD=`netstat -nap|grep $IP:25|grep SYN_RECV|wc -l` EST=`netstat -nap|grep $IP:25|grep ESTABLISHED|grep - | wc -l` ACTIVE=`netstat -nap|grep $IP:25 | grep ESTABLISHED|grep -v -|wc -l` (( TOTAL=HOLD+EST+ACTIVE )) echo "Huidige inkomende SMTP connecties : $HOLD nieuw + $EST wachtend + $ACTIVE actief = $TOTAL" CONNS=`grep ' from ' /var/log/qmail2/qmail-smtpd/current |wc -l` DROPPED=`grep 'rblsmtpd:' /var/log/qmail2/qmail-smtpd/current | wc -l` if [ "$DROPPED" ] && [ "$CONNS" ]; then (( DROPPERC=(100*DROPPED)/CONNS )) echo "Black list percentage : $DROPPERC %" fi echo "INKOMENDE QUEUE LENGTE : $QUEUE" echo echo "In behandeling:" ps faux|grep qmailr2|grep remote|grep -v grep echo echo "################### Scanner #######################" echo "Dspam input processen:" ps ax|egrep "dspam" | grep -- "--user"|grep -v grep echo echo "Dspam laatste resultaten:" tail -5 /home/system/dspam/system.log|cut -f 6-8 echo echo "Huidige scansnelheid : $SPEED mails/minuut" echo "Geschatte wachttijd : $LAG minuten." echo echo "################### Uitgaand #######################" /var/qmail/bin/qmail-qstat echo tac /var/log/maillog|grep "starting delivery"|head -10 |tac|cut -f7- -d" " ' }}}