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
#ip=192.168.178.234
ip=vdrpi
url=pi@$ip
ip=172.16.234.234
url=root@$ip
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
i=0
T=0
echo "Start"
echo -n "."
echo "[" > $log
while [ true ]; do
echo -n "."
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=$?
if [ $r -ne 0 ]; then
echo "Error $n" | tee -a $log
echo "Error $n"
fi
echo -n "$SECONDS."
T=$((T+SECONDS))
echo "," >> $log
lasttim=$SECONDS
#echo -n $lasttim
blocktim=$((blocktim+lasttim))
i=$((i+1))
n=$((n+1))
if [ $i -ge 10 ]; then
if [ $i -ge 50 ]; then
echo " $(date +%T) $n $blocktim"
i=0
echo " $(date +%T) $n T=$T sek." | tee -a $log
T=0
blocktim=0
fi
read -t 1 -n 1 key
if [ "$key" = "x" ]; then
if [ "$key" = "x" ]; then
echo "{} ]" >> $log
exit
fi
done

View File

@@ -1,12 +1,15 @@
#!/bin/bash
ip=192.168.178.116
# ip=192.168.178.116
ip=172.16.99.208
url=root@$ip
#url=root@es-system
broker=192.168.178.25
#broker=192.168.178.25
broker=172.16.170.165
sleeptime=75
#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
function stopp