Raise Exception("No 'Finished' response from Server")Ĭ("Router finished.") Print "Upload speed on the Router: " + self.ROUTERUPĬ("Upload speed on the Router: " + self.ROUTERUP) Print "Download speed on the Router: " + self.ROUTERDOWNĬ("Download speed on the Router: " + self.ROUTERDOWN) Msg = controller.receiveMessageFromServer() Print "Getting Download, Upload speed on the router."Ĭ("Getting Download, Upload speed on the router.")Ĭ("This may take a few minutes") Print "\nDowndload speed: "+self.CLIENTDOWNĬ("Downdload speed on the Client: "+self.CLIENTDOWN)ĬndMessageToServer(self.CLIENTDOWN)Ĭ("Upload speed on the Client: "+self.CLIENTUP)ĬndMessageToServer(self.CLIENTUP)Ĭ("Client finished.") Raise Exception("Unable to measure upload speed on client") Raise Exception("Unable to measure download speed on client.") Self.CLIENTDOWN = speedtest_cli.DOWNSPEED Print "Getting Download, Upload speed on the Client."Ĭ("Getting Download, Upload speed on the Client.")Ĭ("This may take some time") bug("Results: ".format(results))Įxecuting the speedtest on the client, then waiting for the server to complete the speedtest on 'Authorization': 'Token token="%s"' % api_tokenĭatastream_ids = for ds in datastreams] Results = speedtest_cli.speedtest(server=TEST_SERVERS,Īpi_url = config.get('server', 'api_url')Īpi_token = config.get('server', 'api_token')ĭevice_id = config.get('device', 'device_id')ĭevice_url = '%s/devices/%s/' % (api_url, device_id)ĭatastreams = literal_eval(config.get('device', 'datastreams')) Verbose = True if args.verbose else False Logging.getLogger('requests').setLevel(logging.WARNING) Logging_level = logging.DEBUG if bug else logging.INFOįormat='%(asctime)s %(levelname)s: %(message)s.',įormat='%(asctime)s %(levelname)s: %(message)s.') Msge = '%.2f Down y %.2f Up (avg diario) es menos de lo acordado o no? #VTR #ParenDeCagarme' % (mean(speeds_down)/unit, mean(speeds_up)/unit) If current_T - start_T >= diff_tweet and mean(speeds_down)/unit < ideal_down and mean(speeds_up)/unit < ideal_up: Msge = "%.2f Down y %.2f Up (avg diario) es menos de lo acordado o no? #VTR #ParenDeCagarme" % ( # data.append('%s %.2f %.2f\n' % (ctime(),down/unit, up/unit))ĭiff_update += mins_5 # Update every 5 minutesĪnd mean(speeds_down) / unit < ideal_down \n download = " + decodedDownload + "\n") \n download = " + decodedDownload + "\n upload = " + decodedUpload + "\n") # tn.write(b"nvram set wshaper_uplink=" + upload + ", 1) Tn.write(b"nvram set wshaper_downlink=" + download + ", 1) # static for my use case and is therefore unneeded. # Upload speed test appears to be bugged and rarely varies. Raise Exception("No 'Ack' response from Client")ĭownload = str(int((result * 1000) *. Print "Upload speed on the Router: "+self.SERVERUP Print "\nDownload speed on the Router: "+self.SERVERDOWN Raise Exception("Unable to measure upload speed on the Server") Raise Exception("Unable to measure download speed on the Server") Self.SERVERDOWN = speedtest_cli.DOWNSPEED Print "Getting Download, Upload speed on the Router." Raise Exception("No 'Finished' response from Client") Print "Upload speed on Client: " + self.CLIENTUP Print "Download speed on Client: " + self.CLIENTDOWN Print("Waiting for Client to finish the speedtest.")
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |