How can I collate cnet statistics for plotting?
cnet centrally collates statistics on behalf of all nodes, and displays these on the ‘Statistics’ popup window or at the end of a simulation run if cnet is invoked with the -s option (or the -z option to also get zero-valued statistics). We can also print statistics more frequently (periodically) with the correct choice of command line options. These are: -W no need for the windowing interface -T run the simulation as fast as possible -e 5m execute for 5 minutes of simulation time -s yes, we want statistics -f 10s print statistics with a frequency (period) of 10 seconds This will produce volumes of output to cnet’s standard output stream, so we need to both capture this and probably filter only what we need. So, to capture the Efficiency measure (bytes AL/PL) every second (in the hope that it improves), we issue: #!/bin/sh # cnet -W -T -e 5m -s -f 1s TOPOLOGYFILE | \ grep Efficiency | \ cut -d: -f 2 | \ cat -n > effic.statistics The last line takes its input (a column of 300 efficienci