Hi, u can calculate the total energy consumption this way: when u include the energy model in ns2 u must be supplying some "initial energy" to each node this multiplied by theno. of nodes gives the total energy supplied to the network. then from the trace file pickup the last trace of each node at the end of the simulation, for this u may use 'grep' command, this way u will have the resudual energy with the network the difference of the supplied and the residual amounts gives the total energy consumed in any protocol. Regards
