[ndnSIM] Running sample scenario.

Alex Afanasyev alexander.afanasyev at ucla.edu
Thu Nov 13 11:40:53 PST 2014

Hi Anil,

The comment you’re looking applies to NS-3 logger, which suppose to be used only in debug mode to debug the simulation model and/or scenarios.

Answering to your original question.  The post you mentioned refer to different scenario (ndn-tree-tracers), which actually uses tracers.  ndn-grid-topo-plugin-loss scenario was aimed to demonstrate how to set up loss and does not have any tracers in there.  If you want, you can add tracers yourself, e.g., add

  ndn::L3AggregateTracer::InstallAll ("aggregate-trace.txt", Seconds (0.5));
  ndn::L3RateTracer::InstallAll ("rate-trace.txt", Seconds (0.5));

before Simulator::Run();

This should produce two txt files.  Without these or some other tracers, your simulation scenario is running, but not producing anything useful.


> On Nov 12, 2014, at 5:00 PM, Anil Jangam <anilj.mailing at gmail.com> wrote:
> I found this note in log.h file which proved useful. 
>  * LOG functionality: macros which allow developers to
>  * send information out on screen. All logging messages 
>  * are disabled by default. To enable selected logging 
>  * messages, use the ns3::LogComponentEnable
>  * function or use the NS_LOG environment variable 
>  *
>  * Use the environment variable NS_LOG to define a ':'-separated list of
>  * logging components to enable. For example (using bash syntax), 
>  * NS_LOG="OlsrAgent" would enable one component at all log levels. 
>  * NS_LOG="OlsrAgent:Ipv4L3Protocol" would enable two components, 
>  * at all log levels, etc.
>  * NS_LOG="*" will enable all available log components at all levels.
>  *
>  * To control more selectively the log levels for each component, use
>  * this syntax: NS_LOG='Component1=func|warn:Component2=error|debug'
>  * This example would enable the 'func', and 'warn' log
>  * levels for 'Component1' and the 'error' and 'debug' log levels
>  * for 'Component2'.  The wildcard can be used here as well.  For example
>  * NS_LOG='*=level_all|prefix' would enable all log levels and prefix all
>  * prints with the component and function names.
> With this, we can enable log at component level. 
> /anil.
> On Sun, Nov 9, 2014 at 12:30 AM, Anil Jangam <anilj.mailing at gmail.com <mailto:anilj.mailing at gmail.com>> wrote:
> Thanks Spyros. This worked. 
> On Sat, Nov 8, 2014 at 5:51 PM, Spyridon (Spyros) Mastorakis <spiros.mastorakis at gmail.com <mailto:spiros.mastorakis at gmail.com>> wrote:
> Hello Anil,
> you should enable the logging component. You can do that by typing:
> NS_LOG=ndn.Consumer:ndn.Produce ./waf --run=ndn-grid-topo-plugin-loss
> This worked for me and should also work for you.
> Kind regards,
> Spyros 
>> On Nov 8, 2014, at 2:24 PM, Anil Jangam <anilj.mailing at gmail.com <mailto:anilj.mailing at gmail.com>> wrote:
>> Hi Alex,
>> I trace back to one of your replies in past. http://www.lists.cs.ucla.edu/pipermail/ndnsim/2013-January/000040.html <http://www.lists.cs.ucla.edu/pipermail/ndnsim/2013-January/000040.html>
>> When I run one of the example scenarios, I am not sure it is producing any output or if it actually running. The command with waf helper just produces below output. It apparently does not run the use case. 
>> ./waf --run=ndn-grid-topo-plugin-loss
>> Waf: Entering directory `/home/anilj1/sandbox/ndnSIM/ns-3/build'
>> Waf: Leaving directory `/home/anilj1/sandbox/ndnSIM/ns-3//ns-3/build'
>> 'build' finished successfully (1.877s)
>> However, when I run the same command with --vis option it pops up the GUI, and I am able to see the GUI. On F3, I see some action on the GUI. However, this also does not generate any of the trace files you have mentioned in above link. 
>> Can you pls point to correct steps? Does command line (non GUI) produces the logs elsewhere, which I am not aware of?
>> /anil.
>> _______________________________________________
>> ndnSIM mailing list
>> ndnSIM at lists.cs.ucla.edu <mailto:ndnSIM at lists.cs.ucla.edu>
>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim <http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim>
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20141113/5006a8de/attachment.html>

More information about the ndnSIM mailing list