pbxnettest

This commit is contained in:
2023-03-01 19:40:08 +01:00
parent 307ae34907
commit 101ba29d0e

View File

@@ -1,25 +1,32 @@
#!/bin/bash #!/bin/bash
ip=192.168.178.234 #ip=192.168.178.234
url=root@$ip ip=vdrpi
url=pi@$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
srcfile=~/tmp/update-image-tfepi-tfepi.swu testfile=~/Download/nextcloud-18.0.14.tar.bz2
n=0 n=0
i=0 i=0
T=0
echo "Start"
echo -n "."
while [ true ]; do while [ true ]; do
echo -n "." SECONDS=0
scp -q $srcfile $url:/dev/null scp -q -o ConnectTimeout=5 $testfile $url:/dev/null
r=$? r=$?
if [ $r -ne 0 ]; then if [ $r -ne 0 ]; then
echo "Error $n" | tee -a $log echo "Error $n" | tee -a $log
fi fi
echo -n "$SECONDS."
T=$((T+SECONDS))
i=$((i+1)) i=$((i+1))
n=$((n+1)) n=$((n+1))
if [ $i -ge 100 ]; then if [ $i -ge 10 ]; then
i=0 i=0
echo " $(date +%T) $n" | tee -a $log echo " $(date +%T) $n T=$T sek." | tee -a $log
T=0
fi fi
read -t 1 -n 1 key read -t 1 -n 1 key
if [ "$key" = "x" ]; then if [ "$key" = "x" ]; then