Background of Wireless Communication Student Presentations and Projects Wireless Communication Technology Wireless Networking and Mobile IP Wireless Local Area Networks Wireless Communication : LAB 4 NS2 – Extracting Trace Data
Outline NS Trace Extraction overview Visual representation of data Introducing AWK
NS Trace Extraction? Trace File generated by NS contains: Trace packets on all links (ns trace-all) Trace events for the complete simulation Trace packets of all types Event indicators of 4 types i.e. r, +, -, d Simulation often requires comparison between two values e.g. Pakets Dropped vs. Time Throughput vs. Time Number of Packets Received in specific time period UDP vs TCP performance
Trace file Example #Open the Trace file set tf [open out.tr w] $ns trace-all $tf
Tracing – The Hard way ! cat out.tr | grep " 2 3 cbr " | grep ^r | column 1 10 | awk '{dif = $2 - old2; if(dif==0) dif = 1; if(dif > 0) {printf("%d\t%f\n", $2, ($1 - old1) / dif); old1 = $1; old2 = $2}}' > jitter.txt
Data Visualization Xgraph Convert trace output into xgraph format
Example Lab Assignment
Example Lab Time-Line
Example Lab Requirements
What to Submit TCL File/Files Script to parse the Trace Files (bash, awk) Generated Graph Diagrams (JPG format) README text file containing instructions/procedures to test your code All the files should be zipped into a single compressed file, renamed as your_reg_no_lab4.zip zip file to
QUESTIONS ???