Friday, November 17, 2006

Post Processing of Trace File using grep and Excel

I always use grep command to filter out the required information from the MIRAI-SF network simulator . User of ns-2 network simulator also able to use grep command to filter their trace file. For example, the syntax command is:

grep ["keyword to filter"] [source file] > [destination file]
e.g. grep "UDP" source.out >> destination.tr


After that, launch your Microsoft Excel and open the destination file that your previously have run with grep command. Usually the information in column for ns-2 network simulator trace file is separated by space. MIRAI-SF network simulator log file is separated by comma. Text Import Wizard in Microsoft Excel will be launch automatically. In step 1 of 3 window, tab limited radio button is chosen by default and click the Next button to proceed. Now you can use the delimiters option depends on how your information is separated. For example, MIRAI-SF user will choose space option . Then click Finish button.

Now, you able to plot a graph using Microsoft Excel. Alternatively, you can use gnuplot or xgraph which requires some knowledge in their syntax command. ns-2 user can opt to use NANS to view their simulation quickly.

2 comments:

Anonymous said...

now the trace file can be convert in a very professional excel result by PacketBone BoneLight

Unknown said...

Hi Akashah,

How did you manage to filter your trace file in help of grep command?


Thank you,

my email is umutoniyvonne@gmail.com