[Bug 186114] net/mpd5 hangs after a certain number of users connect
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Jun 12 14:50:48 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=186114
--- Comment #25 from Cassiano Peixoto <peixoto.cassiano at gmail.com> ---
Ok, i'll apply your patches and back with syslog facility. Do i need to rebuild
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 shell
script:
OUTPUT="/usr/local/etc/tmp/bras.txt"
TMP="/tmp/sessions.tmp"
TMP2="/tmp/veloc.tmp"
TMP3="/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=`/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'`" != "" ]; then
#echo $session
INTERFACE=`echo $session |awk '{print $1}'`
IP=`echo $session |awk '{print $2}'`
USER=`echo $session |awk '{print $8}'`
MAC=`echo $session |awk '{print $9}'`
VLAN=`echo $session |awk '{print $3}' | awk -F '-' '{print
$1}'`
DESC=`ifconfig ${VLAN} |grep description |awk '{print $2}'`
VELOC=`/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=`/usr/bin/netstat -nbf link -I ${INTERFACE}`
TRAF=`echo $TRAF| awk '{print $19" "$16" "$22" "$20}' | tr ' '
';'`
BLOCK=`ipfw table 1 list |grep ${IP}`
if [ "$BLOCK" = "" ]; then
BLOCK="0"
else
BLOCK="1"
fi
BLOCK2=`ipfw table 2 list |grep ${IP}`
if [ "$BLOCK2" = "" ]; then
BLOCK2="0"
else
BLOCK="1"
fi
BLOCK2=`ipfw table 2 list |grep ${IP}`
if [ "$BLOCK2" = "" ]; then
BLOCK2="0"
else
BLOCK2="1"
fi
while read veloc; do
if [ "`echo $veloc | grep in`" != "" ]; then
BTI=$(echo $veloc |awk '{print $5}')
fi
if [ "`echo $veloc | grep out`" != "" ]; then
BTO=$(echo $veloc |awk '{print $5}')
fi
if [ "`echo $veloc | grep 'seconds'`" != "" ]; then
TIME=$(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
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the freebsd-net
mailing list