As knudfl told me some people use awk in this forum when they are working with ns2 traces, I've found three useful files, made by Marco Fiore some years ago. They help you to calculate the average throughput, the instant throughput and the jitter in a simulation. I've used them with umts. Changing parameters you check, you can see the flow of one, several or all the mobiles you are simulating and diferent types of packets. Just read the readme
I found them here: http://www.mail-archive.com/ns-users.../msg04656.html
I edit: Some people at University were having problems calculating the total flow using that script. I only made two changes, but I post the orginal file with my little changes here because it may help someone.