Hello all,
When I run the first script in the tutorial (
http://www.nsnam.org/docs/
release/3.13/tutorial/html/conceptual-overview.html#a-first-ns-3-
script) with sudo:
sudo ./waf --run scratch/myfirst
I do not see the ns-3 log message.
I have set NS_LOG: i.e. "export NS_LOG=FirstScriptExample=info". I
see the log message when I do not run with sudo.
I also tried redirecting stderr to a file:
sudo ./waf --run scratch/myfirst &>log
and didn't see the log message there.
I've been checking through the section on the logging module in the
manual (
http://www.nsnam.org/docs/release/3.13/tutorial/html/
tweaking.html#using-the-logging-module) but haven't found anything
relevant yet (I certainly can't find any instance of 'sudo' with ctrl-
f).
Explanation of why I'm trying to do this:
In fact I'm interested in running a different script which requires
sudo privileges - specifically emu-ping, an example script
demonstrating usage of the emu net device - but it fails when I run it
and I would like to examine the progress using existing ns-3 log
statements (fyi I can see regular printlns - i.e. cout <<).
According to the comments in emu-net-device.cc I shouldn't have to run
emu-ping with sudo privileges, because emu-net device calls out to
another process (emu-sock-creator) to create the socket; however when
I try to run the script without sudo - i.e. "./waf --run emu-ping" -
it fails on insufficient privileges, so I then try "sudo ./waf --run
emu-ping", which leads me here.
Thanks!