NetSim allows users to generate trace files which provide detailed packet & event information useful for performance validation, statistical analysis and custom code de-bugging. The two traces that can be logged in NetSim are:
1. The Event trace: This records every single event along with associated information such as time stamp, event ID, event type etc.
2. The Packet trace: This logs a set of chosen parameters for every packet as it flows through the network such as arrival times, queuing times, departure times, payload, overhead, errors, collisions etc.
How is the trace useful?
a. Learn protocol internals: Window size variation in TCP, Route Table Formation in OSPF, Medium Access in Wi-fi, etc, are examples of protocol functionalities that can be easily understood from the trace.
b. Log chosen parameters: NetSim’s trace option features a checkbox based filter where users can select only those packet / event level parameters / information which they want to log.
c. Import easily into spread sheets: Tab ordering enables the trace data to be imported into spreadsheets programs such as excel with ease for statistical analysis. Further, the events / packets are printed per line and have a unique ID and time stamp. This enables users to quickly write custom scripts to parse, inspect, plot and analyze protocol parameters.
d. Debug custom protocol implementations: Users need diagnostics that can catch logical errors without having to set a lot of breakpoints or restarting the program often. A host of information is available in the trace files and in addition the event trace has two special information fields for diagnostics a) A log of the file name and line number from where the event was generated and b) Future event (s) generated while processing the current event.
How to turn on the tracing options
By default, the packet tracing option is turned off. Users can edit the config file and “enable” packet-trace, or users can turn them on using the trace button in the UI. Event-traces are “always-on” and are available with our kernel’s debug library.