[ndnSIM] How to enable Cache hits and misses tracing in ndnSIM 2.8

Hussein AlOmaisi alomaisi2004 at yahoo.com
Wed Apr 21 20:22:31 PDT 2021

I have this scenario: 
A (consumer)    ------     B(router)    --------  C(router)    -------    D (consuemr) ------  E (producer)
both consumer nodes (A & D) start at the same time. I expected according to NDN's basic forwarding mechanism that consumer (A) can get a response for its request from the cache of consumer (D) which is at (3) hop counts from consumer (A). However, the consumer (A) gets responses from the producer (D) not from the cache of consumer (D). How to enable caching and serving requests from caches in the intermediate node if not enabled by default?
One more point, using ndn-cxx.nfd.Forwarder log component I can see the consumer (D) go through Forwarder::onContentStoreHit() and the value of m_counters.nCsHits  counter increases. However, the CS Tracer does not show that.
How I can enable CS tracer in ndnSIM 2.8 to show the number of cache hits and misses. it currently shows me a text file with all CacheHits and CacheMisses are Zeroes. For example:
Time Node Type             Packets 1             0         CacheHits     01             0         CacheMisses    01             1         CacheHits     01             1         CacheMisses    01             2         CacheHits     01             2         CacheMisses    0...
I appreciate your assistance.

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

More information about the ndnSIM mailing list