# server
node1 = ec.register_resource("LinuxNode")
-ec.set(node1, "hostname", "wlab19.")
+ec.set(node1, "hostname", "wlab29.")
ec.set(node1, "username", "root")
ec.set(node1, "gatewayUser", "etourdi")
ec.set(node1, "gateway", "etourdi.pl.sophia.inria.fr")
app1 = ec.register_resource("LinuxApplication")
video= "../big_buck_bunny_240p_mpeg4_lq.ts"
ec.set(app1, "sources", video)
-command = "cat ${SRC}/big_buck_bunny_240p_mpeg4_lq.ts| nc wlab5 1234"
+command = "cat ${SRC}/big_buck_bunny_240p_mpeg4_lq.ts| nc wlab5. 1234"
ec.set(app1, "command", command)
ec.register_connection(app1, node1)
procs = dict()
ps_aux = "ps aux |awk '{print $2,$11}'"
(out, err), proc = self.node.execute(ps_aux)
- for line in out.strip().split("\n"):
- parts = line.strip().split(" ")
- procs[parts[0]] = parts[1]
- pickle.dump(procs, open("/tmp/save.proc", "wb"))
+ if len(out) != 0:
+ for line in out.strip().split("\n"):
+ parts = line.strip().split(" ")
+ procs[parts[0]] = parts[1]
+ pickle.dump(procs, open("/tmp/save.proc", "wb"))
# create run dir for application
self.node.mkdir(self.run_home)
pids_temp = dict()
ps_aux = "ps aux |awk '{print $2,$11}'"
(out, err), proc = self.execute(ps_aux)
- for line in out.strip().split("\n"):
- parts = line.strip().split(" ")
- pids_temp[parts[0]] = parts[1]
- kill_pids = set(pids_temp.items()) - set(pids.items())
- kill_pids = ' '.join(dict(kill_pids).keys())
-
- cmd = ("killall tcpdump || /bin/true ; " +
- "kill $(ps aux | grep '[n]epi' | awk '{print $2}') || /bin/true ; " +
- "kill %s || /bin/true ; " % kill_pids)
+ if len(out) != 0:
+ for line in out.strip().split("\n"):
+ parts = line.strip().split(" ")
+ pids_temp[parts[0]] = parts[1]
+ kill_pids = set(pids_temp.items()) - set(pids.items())
+ kill_pids = ' '.join(dict(kill_pids).keys())
+
+ cmd = ("killall tcpdump || /bin/true ; " +
+ "kill $(ps aux | grep '[n]epi' | awk '{print $2}') || /bin/true ; " +
+ "kill %s || /bin/true ; " % kill_pids)
+ else:
+ cmd = ("killall tcpdump || /bin/true ; " +
+ "kill $(ps aux | grep '[n]epi' | awk '{print $2}') || /bin/true ; ")
else:
cmd = ("killall tcpdump || /bin/true ; " +
"kill $(ps aux | grep '[n]epi' | awk '{print $2}') || /bin/true ; ")
if gw:
if gwuser:
- proxycommand = 'ProxyCommand=ssh %s@%s -W %%h:%%p' % (gwuser, gw)
+ proxycommand = 'ProxyCommand=ssh -q %s@%s -W %%h:%%p' % (gwuser, gw)
else:
- proxycommand = 'ProxyCommand=ssh %%r@%s -W %%h:%%p' % gw
+ proxycommand = 'ProxyCommand=ssh -q %%r@%s -W %%h:%%p' % gw
args.extend(['-o', proxycommand])
if agent:
if gw:
if gwuser:
- proxycommand = 'ProxyCommand=ssh %s@%s -W %%h:%%p' % (gwuser, gw)
+ proxycommand = 'ProxyCommand=ssh -q %s@%s -W %%h:%%p' % (gwuser, gw)
else:
- proxycommand = 'ProxyCommand=ssh %%r@%s -W %%h:%%p' % gw
+ proxycommand = 'ProxyCommand=ssh -q %%r@%s -W %%h:%%p' % gw
args.extend(['-o', proxycommand])
if recursive: