Skip to content

udaysehgal/unet-stack-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Network Simulation Trace Analyzer

This tool is designed to analyze network simulation traces generated by the UnetStack simulator. It provides insights into various network parameters such as received packets, throughput, and more.

Introduction

To understand the purpose of this tool, it's helpful to first run a simulation in UnetStack. During the simulation, the simulator displays statistics for each simulation, including received packets, throughput, and other network parameters. Our goal is to replicate and extend this functionality in a separate script.

.Nam File/Legacy Trace File

We utilize the .nam file generated by UnetStack for our analysis. This file contains information about packet creation, transmission, reception, and drop events, as well as node motion. We chose to use the .nam file over the default .json file due to its simplicity and better documentation.

To obtain the .nam file, insert the following command at the top of your script, as soon as you encounter any other command related to trace:

trace reset; # Reset the trace buffer
trace add -p 0.01 all; # Log all events with 0.01s precision

The trace file contains detailed information that our script parses to extract relevant statistics.

Problems Faced & Solutions

Initially, we encountered issues with double-counting and excluding warm-up time from our analysis. We addressed these problems by using a set to ensure unique packet counts and by ignoring packets with timestamps before the warm-up period.

How to Run the Analyzer

  1. Ensure your .nam file is in the same folder as the Python script.
  2. Run the script with the following command, replacing your_file.nam with your actual file name:

python network_analyzer.py "your_file.nam"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages