Getting QoS metrics using TRPR

TRPR (TRace Plot Real-time) is a program which analyzes output from various sources and creates output suitable for plotting.
It can analyze output files from:
  • tcpdump
  • Network Simulator 2
  • mgen

TRPR is able to prepare IP QoS metrics such as:
  • mean rate of packets stream
  • differential interarrival packet delays
  • transmission delay
  • packet loss
  • end other

TRPR can distinguish each flow according to: source and destination IP, source and destination port, flow id and type of transmission (TCP or UDP).
Example:
./trpr latency drec input input.drc auto X,X,192.168.10.116/4000 output output.txt
  • input.drc: output file from mgen
  • 192.168.10.116/4000: destination IP and port which identifies flow
  • output.txt: file ready for plotting
  • information about other parameters can be found here.

What if I wanted to have mean values of metrics in given flow?
Linux awk tool can be used for providing metrics from output.txt.
First of all we have to remove from our file few lines from the beginning, which are used for plotting.
Awk script for getting mean value can look like (2nd column in our file is one with latencies):
BEGIN { FS = " "} {
allV = $2 + allV;
all = all+1;
} END {
mean = allV/all
print "Mean Latency: " mean
}

After executing:
awk -f script.awk output.txt
we should get mean delay of our flow.
What is important: source and destination MUST BE synchronized if metrics such as latency and interarrival time are important for us. It would be fine even if one of them would be source of time for another.

Comments