Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[mininet-discuss] How to redirect the ouput of a process to mininet cli.

Bob Lantz 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:

> Thanks.
>  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>:
> 
>> Hi.
>> 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.
>> 
>> 
>> Thanks.
>> 
>> -- 
>> 
>> 吾輩は猫である。ホームーページはhttp://introo.me。
>> _______________________________________________
>> mininet-discuss mailing list
>> mininet-discuss at lists.stanford.edu
>> https://mailman.stanford.edu/mailman/listinfo/mininet-discuss
> 
> 
> 
> -- 
> 
> 吾輩は猫である。ホームーページはhttp://introo.me。
> _______________________________________________
> mininet-discuss mailing list
> mininet-discuss at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/mininet-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/mininet-discuss/attachments/20140421/54e13596/attachment-0001.html>


More information about the mininet-discuss mailing list