diff --git a/stationStressTest.py b/stationStressTest.py index a6d6c327..e2030ee9 100755 --- a/stationStressTest.py +++ b/stationStressTest.py @@ -5,7 +5,7 @@ import time sys.path.append('py-json') import json import pprint -from datetime import date +import datetime from LANforge import LFRequest from LANforge import LFUtils @@ -160,8 +160,18 @@ for name in stations: #create weblog for monitoring stations -webLog = "stationStressTestLog.html" -f = open(webLog,"w") +curTime = datetime.datetime.now().strftime("%Y-%m-%d_%H%M") +webLog = "/home/lanforge/Documents/load-test/loadTest{}.html".format(curTime) + +try: + f = open(webLog,"w") + +except IOError as err: + print(err) + print("Please ensure correct permissions have been assigned in target directory") + sys.exit() + + top = """
| {} | \n".format(name)) -for min5 in range(1): +f.write("|
|---|---|
| {} | \n".format(radio)) - f.write("|
| \n") - f.write(" | {} | ".format(staName)) - f.write("\n") - f.write("{}/{} | ".format(good,numStations)) #without IP assigned + elif dissociated: + f.write("{}/{} | ".format(good,numStations)) #dissociated from AP + else: + f.write("{}/{} | ".format(good,numStations)) #with IP and associated - f.write("