From bf6802b57b922a73a27755322f6c4ca4e7457892 Mon Sep 17 00:00:00 2001 From: Quentin De Coninck Date: Fri, 10 Jun 2016 14:41:11 +0200 Subject: [PATCH] mpExperienceHTTP: use apache --- src/mpExperienceHTTP.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mpExperienceHTTP.py b/src/mpExperienceHTTP.py index 3d81acd..f8cc3de 100644 --- a/src/mpExperienceHTTP.py +++ b/src/mpExperienceHTTP.py @@ -49,8 +49,7 @@ class MpExperienceHTTP(MpExperience): self.random_size) def getHTTPServerCmd(self): - s = "python " + os.path.dirname(os.path.abspath(__file__)) + \ - "/http.py &>" + MpExperienceHTTP.SERVER_LOG + "&" + s = "/etc/init.d/apache2 restart &>" + MpExperienceHTTP.SERVER_LOG + "&" print(s) return s @@ -70,9 +69,13 @@ class MpExperienceHTTP(MpExperience): def run(self): 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.client, "sleep 2") 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.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")