This commit is contained in:
Marc Hoppe
2023-03-14 20:01:19 +01:00
parent 101ba29d0e
commit e3e4a6ea3e
2 changed files with 24 additions and 18 deletions

View File

@@ -1,35 +1,38 @@
#!/bin/bash #!/bin/bash
#ip=192.168.178.234 #ip=192.168.178.234
ip=vdrpi ip=172.16.234.234
url=pi@$ip url=root@$ip
log=$HOME/tmp/pbxnettest_$(date +%y%m%d%H%M%S).log log=$HOME/tmp/pbxnettest_$(date +%y%m%d%H%M%S).log
testfile=~/Download/nextcloud-18.0.14.tar.bz2 srcfile=~/Downloads/12.0sp1.zip
sshopt='-i ~/.ssh/cm4'
n=0 n=0
i=0 i=0
T=0
echo "Start" echo "[" > $log
echo -n "."
while [ true ]; do while [ true ]; do
echo -n "."
SECONDS=0 SECONDS=0
scp -q -o ConnectTimeout=5 $testfile $url:/dev/null iperf3 -c $ip -t 10 -J >> $log
#scp -q $sshopt $srcfile $url:/dev/null
r=$? r=$?
if [ $r -ne 0 ]; then if [ $r -ne 0 ]; then
echo "Error $n" | tee -a $log echo "Error $n"
fi fi
echo -n "$SECONDS." echo "," >> $log
T=$((T+SECONDS)) lasttim=$SECONDS
#echo -n $lasttim
blocktim=$((blocktim+lasttim))
i=$((i+1)) i=$((i+1))
n=$((n+1)) n=$((n+1))
if [ $i -ge 10 ]; then if [ $i -ge 50 ]; then
echo " $(date +%T) $n $blocktim"
i=0 i=0
echo " $(date +%T) $n T=$T sek." | tee -a $log blocktim=0
T=0
fi fi
read -t 1 -n 1 key read -t 1 -n 1 key
if [ "$key" = "x" ]; then if [ "$key" = "x" ]; then
echo "{} ]" >> $log
exit exit
fi fi
done done

View File

@@ -1,12 +1,15 @@
#!/bin/bash #!/bin/bash
ip=192.168.178.116 # ip=192.168.178.116
ip=172.16.99.208
url=root@$ip url=root@$ip
#url=root@es-system #url=root@es-system
broker=192.168.178.25 #broker=192.168.178.25
broker=172.16.170.165
sleeptime=75 sleeptime=75
#topic_power="cmnd/powplug2/power" #topic_power="cmnd/powplug2/power"
topic_power="cmnd/plug-b/power" #topic_power="cmnd/plug-b/power"
topic_power="shellies/rw2/whg3/buero/steckdose1/relay/0/command"
log=$HOME/tmp/pbxpcitest_$(date +%y%m%d%H%M%S).log log=$HOME/tmp/pbxpcitest_$(date +%y%m%d%H%M%S).log
function stopp function stopp