mpExperienceHTTP: use apache
This commit is contained in:
parent
6367856ee0
commit
bf6802b57b
@ -49,8 +49,7 @@ class MpExperienceHTTP(MpExperience):
|
|||||||
self.random_size)
|
self.random_size)
|
||||||
|
|
||||||
def getHTTPServerCmd(self):
|
def getHTTPServerCmd(self):
|
||||||
s = "python " + os.path.dirname(os.path.abspath(__file__)) + \
|
s = "/etc/init.d/apache2 restart &>" + MpExperienceHTTP.SERVER_LOG + "&"
|
||||||
"/http.py &>" + MpExperienceHTTP.SERVER_LOG + "&"
|
|
||||||
print(s)
|
print(s)
|
||||||
return s
|
return s
|
||||||
|
|
||||||
@ -70,9 +69,13 @@ class MpExperienceHTTP(MpExperience):
|
|||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
cmd = self.getHTTPServerCmd()
|
cmd = self.getHTTPServerCmd()
|
||||||
|
self.mpTopo.commandTo(self.mpConfig.server, "netstat -sn > netstat_server_before")
|
||||||
self.mpTopo.commandTo(self.mpConfig.server, cmd)
|
self.mpTopo.commandTo(self.mpConfig.server, cmd)
|
||||||
|
|
||||||
self.mpTopo.commandTo(self.mpConfig.client, "sleep 2")
|
self.mpTopo.commandTo(self.mpConfig.client, "sleep 2")
|
||||||
cmd = self.getHTTPClientCmd()
|
cmd = self.getHTTPClientCmd()
|
||||||
|
self.mpTopo.commandTo(self.mpConfig.client, "netstat -sn > netstat_client_before")
|
||||||
self.mpTopo.commandTo(self.mpConfig.client, cmd)
|
self.mpTopo.commandTo(self.mpConfig.client, cmd)
|
||||||
|
self.mpTopo.commandTo(self.mpConfig.server, "netstat -sn > netstat_server_after")
|
||||||
|
self.mpTopo.commandTo(self.mpConfig.client, "netstat -sn > netstat_client_after")
|
||||||
self.mpTopo.commandTo(self.mpConfig.client, "sleep 2")
|
self.mpTopo.commandTo(self.mpConfig.client, "sleep 2")
|
||||||
|
Loading…
Reference in New Issue
Block a user