I realised the package has different names, and maybe its even added in the latest distro's only, I don't know.
@hourly runs every xx:00 if I recall correctly, not sure though.
Glad your're happy with it
Moderator: leecollings
emme wrote:low ping means fast response.... so it's good
high ping means slow response... that' bad
Watch out the unit: normally it's ms-->milliseconds
safi78 wrote:hmm i have the same thing, even with the 'wget -q' and redirect to /dev/null etc. weird. gotto look into that.
somewhat reassuring, I think I'm using my SSD for about 2 years now with a lot of scripting, testing, trial and error, etc and it's still fine.
Backup is not the problem....safi78 wrote:backup, backup backup
Anyway, you can always create a 'ram-drive' to redirect this stuff to? Saves you disk-trashing
Code: Select all
0 1 * * * sudo ~/domoticz/scripts/domoticz_backup.sh
5 1 * * 6 sudo ~/domoticz/scripts/scripts_backup.sh
10 1 * * 6 sudo ~/domoticz/scripts/domoticz_map_backup.sh
1 1 1 * * sudo ~/domoticz/scripts/raspberry_backup.sh
Code: Select all
pi@raspberrypi ~/domoticz/scripts $ ./speedtest.sh
ping = 37.035 ms
download = 33.04 Mbps
upload = 9.32 Mbps
HTTP/1.1 200 OK
Content-Length: 24
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *
{
"status" : "ERR"
}
HTTP/1.1 200 OK
Content-Length: 24
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *
{
"status" : "ERR"
}
HTTP/1.1 200 OK
Content-Length: 24
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *
{
"status" : "ERR"
}
Code: Select all
#!/bin/bash
#setup
host=192.168.5.75
port=8081
username=LOGIN
password=WW
pingidx=4427
downloadidx=4426
uploadidx=4425
# no need to edit
speedtest-cli --simple > output.txt
ping=$(cat output.txt | sed -ne 's/^Ping: \([0-9]*\.[0-9]*\).*/\1/p')
download=$(cat output.txt | sed -ne 's/^Download: \([0-9]*\.[0-9]*\).*/\1/p')
upload=$(cat output.txt | sed -ne 's/^Upload: \([0-9]*\.[0-9]*\).*/\1/p')
#output if you run it manually
echo "ping = $ping ms"
echo "download = $download Mbps"
echo "upload = $upload Mbps"
curl -s -i -H "Accept: application/json" "http://$host:$port/json.htm?type=command¶m=udevice&idx=$idxdl&svalue=$download"
curl -s -i -H "Accept: application/json" "http://$host:$port/json.htm?type=command¶m=udevice&idx=$idxul&svalue=$upload"
curl -s -i -H "Accept: application/json" "http://$host:$port/json.htm?type=command¶m=udevice&idx=$idxpng&svalue=$png"
Code: Select all
curl -s -i -H "Accept: application/json" "http://$username:$password@$host:$port/json.htm?type=command¶m=udevice&idx=$pingidx&svalue=$ping"
curl -s -i -H "Accept: application/json" "http://$username:$password@$host:$port/json.htm?type=command¶m=udevice&idx=$downloadidx&svalue=$download"
curl -s -i -H "Accept: application/json" "http://$username:$password@$host:$port/json.htm?type=command¶m=udevice&idx=$uploadidx&svalue=$upload"I installed it and ran an admin-cmd. But PIP is not recognized as command or program...jumbotroll wrote:On windows 10 it's working here.manjh wrote:This is great for the R-Pi, but is there an alternative for a Windows based server?
Install python 3.5.2 from https://www.python.org/downloads/
Open cmd as Administrator and type: pip install speedtest-cli
Then you can type: speedtest