Reputation: 560
I have a python program (mypro.py) in which i want to run on all the hosts of my topology simultaneously (i.e., without going to each xtrem window and typing python mypro.py). Is there a way to do that on the xterm of Mininet environment by using a script?
Many thanks
Upvotes: 3
Views: 1239
Reputation: 169
py [h.cmd('python mypro.py &') for h in net.hosts]
or If you are running a Mininet script, you can add the following code to execute the installation command on all nodes:
from mininet.net import Mininet
net = Mininet()
net.start()
for host in net.hosts:
host.cmd('python mypro.py')
net.stop()
Upvotes: 0
Reputation: 382
Suppose you have a simple topology, h1 - s1 - h2, you could forward X11, then:
Upvotes: 0