if you don't want to open an xterm for each node, using the CLI, you can simply do:
NODENAME COMMAND,
mininet> h1 echo 'hello'
hello
this will execute echo 'hello' on host h1.
otherwise, you can build a python script and use the cmd function on the nodes.
API
example with pipe:
If you want to redirect the out of h1 in h1.txt and then test with iperf.
mininet> h1 iperf -s | tee h1.txt &
mininet> h2 iperf -c 10.0.0.1
------------------------------------------------------------
Client connecting to 10.0.0.1, TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 3] local 10.0.0.2 port 51858 connected with 10.0.0.1 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 2.43 GBytes 2.08 Gbits/sec
mininet>
in this case, doing cat h1.txt in the directory, I have the log:
root@raspberrypi:~# cat h1.txt
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 10.0.0.1 port 5001 connected with 10.0.0.2 port 51858
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 2.43 GBytes 2.08 Gbits/sec
root@raspberrypi:~#