Commit 67223b05 authored by Olav Kvittem's avatar Olav Kvittem

sipp-test ut i ny versjon fra sip-services

fjernet sipmon-katalogen


git-svn-id: file:///home/svn/sipshaman/trunk@5 9383e1fa-a92b-456e-b4ec-45f0d4f7abeb
parent d975b64d
#!/bin/bash
# run a series of sipp-tests and store the logs
. /etc/sipshaman/sipshaman.cf
source /etc/sipshaman/sipshaman.cf
y=`date +%Y`
m=`date +%m`
d=`date +%d`
h=`date +%H`
ydir=$DATA/$y
test -d $ydir || mkdir $ydir
mdir=$ydir/$m
......@@ -18,27 +17,42 @@ test -d $ddir || mkdir $ddir
hdir=$ddir/$h
test -d $hdir || mkdir $hdir
cd $hdir
port=$SIP_PORT # sip service port start
mport=$MEDIA_PORT # rtp service port start
export IFS=";"
addr=`/sbin/ifconfig eth0 | perl -ne 'print $1 if /inet addr:(\d+\.\d+\.\d+\.\d+)/'`
addr=`/sbin/ifconfig eth0| perl -ne 'print $1 if /inet addr:(\d+\.\d+\.\d+\.\d+)/'`
while read server service rest; do
while read server service outproxy function machine calls; do
if test -z "$server"; then
continue
fi
if test -z "$outproxy"; then
outproxy="outgoing-proxy-missing"
fi
if test -z "$calls" ; then
calls=1
fi
echo $server | egrep -q '^\s*#'
if test $? = 1 ; then # no comment
$BIN/sipp $server -s $service -i $addr -sf $CONF/sipp-client.xml -p $port -mp $mport -m 10 -rp 200000 -l 1 -trace_stat -fd 99999 -trace_logs -trace_msg -trace_err -bg >/dev/null 2>&1 &
/usr/bin/sipp $server -s $service -i $addr -sf $CONF/sipp-client-media.xml -p $port -mp $mport -m $calls -rp 200000 -l 1 -trace_stat -fd 99999 -trace_logs -trace_msg -trace_err -bg -nofork -rsa $outproxy 2>> sipp.err >> sipp.log &
pid=$!
adr=$service@$server
echo $y-$m-$d `date +%T` $pid $port $mport $service@$server `ping -c 10 -i 0.5 -q $server | awk -F / '/^rtt /{print $5}'`>> task.log
server_ip=`echo $server| sed -e 's/:.*//'`
# echo server_ip $server_ip
echo $y-$m-$d `date +%T` $pid $port $mport $service@$server $function $machine `ping -c 10 -i 0.5 -q $server_ip | awk -F / '/^rtt /{print $5}'`>> task.log
time=$y-$m-$d-$h
# perl -e "dbmopen(%tests, 'sip-test.dbm',0622); \$tests\{$time,$pid\}=$adr;dbmclose(%tests)"
port=$(($port+2))
mport=$(($mport+4))
sleep 3
fi
done
# Sippmon is a scripts collection for monitoring of quality of sip services
# where the monitoring data is
DATA = /var/log/sipshaman
DATA=/var/log/sipshaman
# config
CONF = /etc/sipshaman
CONF=/etc/sipshaman
# scripts
BIN = /usr/bin
BIN=/usr/bin
# xymon reports hst
BB_HOST = 158.38.60.214
BB_HOST=158.38.60.214
# noc mail address
NOC = sip-monitoring@uninett.no
NOC=sip-monitoring@uninett.no
# SIP port for REGISTER
REGISTER_PORT = 6050
REGISTER_PORT=6050
# SIP port sipp testing
SIP_PORT = 5065
SIP_PORT=5065
# SIP RTP media port start
MEDIA_PORT = 16400
MEDIA_PORT=16400
# Sippmon is a scripts collection for monitoring of quality of sip services
# where the monitoring data is
DATADIR = /var/local/sippmon
# config
CONFDIR = /local/net-status/sipp/etc
# scripts
BINDIR = /local/net-status/sipp/bin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment