Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jun 2017 14:50:47 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-net@FreeBSD.org
Subject:   [Bug 186114] net/mpd5 hangs after a certain number of users connect
Message-ID:  <bug-186114-2472-lkfeMEURR5@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-186114-2472@https.bugs.freebsd.org/bugzilla/>
References:  <bug-186114-2472@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D186114

--- Comment #25 from Cassiano Peixoto <peixoto.cassiano@gmail.com> ---
Ok, i'll apply your patches and back with syslog facility. Do i need to reb=
uild
the world (userland)?

Regarding uwrlck I am using mpd5 web to collect some connections statistics
each 60 minutes (it's a cron job). I'm using the following quite simple she=
ll
script:

OUTPUT=3D"/usr/local/etc/tmp/bras.txt"

TMP=3D"/tmp/sessions.tmp"
TMP2=3D"/tmp/veloc.tmp"
TMP3=3D"/tmp/result.tmp"
if [ -e $TMP ]; then
        rm $TMP
fi
if [ -e $TMP2 ]; then
        rm $TMP2
fi
if [ -e $TMP3 ]; then
        rm $TMP3
fi

SESSIONS=3D`/usr/local/bin/curl -k -l --user admin:xxx
http://127.0.0.1:5006/bincmd\?show%20sessions 2>&1 > $TMP`
while read session; do
        if [ "`echo $session |grep -v 'RESULT'`" !=3D "" ]; then
                #echo $session
                INTERFACE=3D`echo $session |awk '{print $1}'`
                IP=3D`echo $session |awk '{print $2}'`
                USER=3D`echo $session |awk '{print $8}'`
                MAC=3D`echo $session |awk '{print $9}'`
                VLAN=3D`echo $session |awk '{print $3}' | awk -F '-' '{print
$1}'`
                DESC=3D`ifconfig ${VLAN} |grep description |awk '{print $2}=
'`
                VELOC=3D`/usr/local/bin/curl -k -l --user admin:xxx
http://127.0.0.1:5006/bincmd\?iface%20${INTERFACE}\&show%20customer 2>&1 |
egrep 'in#|out#|seconds' > $TMP2`
                TRAF=3D`/usr/bin/netstat -nbf link -I ${INTERFACE}`
                TRAF=3D`echo $TRAF| awk '{print $19" "$16" "$22" "$20}' | t=
r ' '
';'`
                BLOCK=3D`ipfw table 1 list |grep ${IP}`
                if [ "$BLOCK" =3D "" ]; then
                        BLOCK=3D"0"
                else
                        BLOCK=3D"1"
                fi
                BLOCK2=3D`ipfw table 2 list |grep ${IP}`
                if [ "$BLOCK2" =3D "" ]; then
                        BLOCK2=3D"0"
                else
                        BLOCK=3D"1"
                fi
                BLOCK2=3D`ipfw table 2 list |grep ${IP}`
                if [ "$BLOCK2" =3D "" ]; then
                        BLOCK2=3D"0"
                else
                        BLOCK2=3D"1"
                fi
                while read veloc; do
                        if [ "`echo $veloc | grep in`" !=3D "" ]; then
                                BTI=3D$(echo $veloc |awk '{print $5}')
                        fi
                        if [ "`echo $veloc | grep out`" !=3D "" ]; then
                                BTO=3D$(echo $veloc |awk '{print $5}')
                        fi
                        if [ "`echo $veloc | grep 'seconds'`" !=3D "" ]; th=
en
                                TIME=3D$(echo $veloc|awk '{print $4}')
                        fi
                done < $TMP2
                echo
"${USER};${IP};${TIME};${VLAN};${DESC};${BTI};${BTO};${INTERFACE};${TRAF};$=
{BLOCK};${BLOCK2};${MAC}"
>> $TMP3
        fi
done < $TMP
cp $TMP3 $OUTPUT

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-186114-2472-lkfeMEURR5>