You can use a text processing language such as awk in oder to extract information from NS-2 trace files. I recommend the tutorial "NS by example". You can find it in this link:
joseph jude : I want to know if I need to make any changes with awk attached for my trace file? I have a trace file.Can anyone help me with the awk script for it?