Commit 79ba2edb authored by Olav Kvittem's avatar Olav Kvittem

able to run more sipp-suystems on one machine supporting

alternate config file


git-svn-id: file:///home/svn/sipshaman/trunk@14 9383e1fa-a92b-456e-b4ec-45f0d4f7abeb
parent fede3f64
......@@ -87,8 +87,8 @@ foreach $tasklog(@ARGV){
chomp(@f);
my $rtp_files= join(' ', @f);
$cmd="/usr/bin/qstream -v -rtp -rtt '$rtt' -id $src -xml $tmp $rtp_files";
$qstream_rep='date +%T $pid $port $mport $service@$server $function $machine ping' . $_;
my $T=`date +%T`; chomp($T);
$qstream_rep=sprintf "%s $pid $port $mport $service@$server $function $machine ping",$T;
open QSTREAM, "$cmd|";
while(<QSTREAM>){ $qstream_rep.=$_}
close QSTREAM;
......
......@@ -2,7 +2,12 @@
# make qstream statistics from sipp-test logs
# - listen to updates on the task.log file
. /etc/sipshaman/sipshaman.cf
if test .$1 = .-cf ; then
source $2
shift; shift
else
source /etc/sipshaman/sipshaman.cf
fi
y=`date +%Y`
m=`date +%m`
......
......@@ -4,19 +4,25 @@
# sipp exits for each and logs data in a directory per hour
# and exits withinafter an hour
. /etc/sipshaman/sipshaman.cf
registrar=`/sbin/ifconfig eth0| perl -ne 'print $1 if /inet addr:(\d+\.\d+\.\d+\.\d+)/'`
interf=$registrar
interf=`/sbin/ifconfig eth0| perl -ne 'print $1 if /inet addr:(\d+\.\d+\.\d+\.\d+)/'`
proxy=$interf
if test .$1 = .-h; then
echo Usage__: $0 "[registrar [announed-interface]]"
echo Default: $0 $registrar $interf
echo Usage__: $0 "[-cf] <config-file> [proxy [announed-interface]]"
echo Default: $0 $proxy $interf
exit 1
fi
if test .$1 = .-cf ; then
source $2
shift; shift
else
source /etc/sipshaman/sipshaman.cf
fi
if test $# -gt 0; then
registrar=$1
proxy=$1
shift
fi
if test $# -gt 0; then
......@@ -25,7 +31,7 @@ if test $# -gt 0; then
fi
while test 1=1 ; do
ps axw | grep -q "$BIN/[s]ipp $registrar" -
ps axw | grep -q "$BIN/[s]ipp $proxy" -
if test $? = 1 ; then # not found
y=`date +%Y`
......@@ -48,10 +54,10 @@ fi
port=$SIP_PORT
mport=16388
$BIN/sipp $registrar:5062 -s sipp -i $interf -p $port -mp $mport -l 1 -m 1 -sf $CONF/sipp-responder.xml -trace_stat -trace_logs -trace_err -trace_msg -rp 600000 -r 1 -bg -nofork 2>> sipp.err >> sipp.log &
$BIN/sipp $proxy:$PROXY_PORT -s sipp -i $interf -p $port -mp $mport -l 1 -m 1 -sf $CONF/sipp-responder.xml -trace_stat -trace_logs -trace_err -trace_msg -rp 600000 -r 1 -bg -nofork 2>> sipp.err >> sipp.log &
pid=$!
echo $y-$m-$d `date +%T` $pid $port $mport sipp@$interf iPBX `hostname --fqdn` 0 >> task.log
echo $y-$m-$d `date +%T` $pid $port $mport sipp@$interf $REPORT_TAG `hostname --fqdn` 0 >> task.log
t2=`date +%s`
dt=$(($t2-$t1))
if test $dt -lt 5; then #
......
#!/bin/bash
source /etc/sipshaman/sipshaman.cf
if test .$1 = .-cf ; then
source $2
shift;shift
else
source /etc/sipshaman/sipshaman.cf
fi
y=`date +%Y`
m=`date +%m`
......
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