Search Mailing List Archives
[mininet-discuss] How to redirect the ouput of a process to mininet cli.
rlantz at cs.stanford.edu
Mon Apr 21 11:27:47 PDT 2014
You can also use pexec().
On Apr 21, 2014, at 10:35 AM, Shiyao Ma <i at introo.me> wrote:
> I was at first stuck with the `Node.sendCmd ` and I later discovered that this is not a public api (which secretly set self.waiting = True). So I should avoid Node.sendCMD.
> I then found Mininet use bash's job control. So, a Node.cmd("foobar &") will just make it. (As documented on the web).
> 2014-04-21 20:56 GMT+08:00 Philip Wette <wette at mail.upb.de>:
> You can redirect stdout and stderr to a file exactly in the way you would do that in bash, too.
> Just add "> /tmp/output 2>&1" to your function call.
> Von meinem iPhone gesendet
> Am 21.04.2014 um 14:49 schrieb Shiyao Ma <i at introo.me>:
>> Mininet can start a process and not wait it by Node.sendCmd. But this loses all the stdout of that process and more importantly the stderr, which quite critic when writing a python script.
>> I wonder is there any sendCmd like thing but also outputs the stderr and stdout of the launched process to CLI(Mininet) or a certain file.
>> mininet-discuss mailing list
>> mininet-discuss at lists.stanford.edu
> mininet-discuss mailing list
> mininet-discuss at lists.stanford.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mininet-discuss