Hello Hamid! I think the first expression would be correct if $bw1 was expressed in bits, not octets(8 bits/8=1 Byte, not 8 bits*8=1 byte). But since the packets' sizes are measured in bytes(octets), i think that 8 is not necessary anymore, the measuring unit will result in MBps without multipying with 8. Regards, Alexandra
hamid reza <[EMAIL PROTECTED]> wrote: Hi All, Most people used below instruction for calculating a bandwidth #Calculate the bandwidth (in MBit/s) and write it to the files puts $grfd "$now [expr $bw1/$time*8/1024/1024] [expr $bw2/$time*8/1024/1024] [expr $bw3/$time*8/1024/1024]" But I Think The Correct one is : #Calculate the bandwidth (in MBit/s) and write it to the files puts $grfd "$now [expr $bw1*8/$time/1024/1024] [expr $bw2/$time*8/1024/1024] [expr $bw3/$time*8/1024/1024]" I did this on ns set x 5; set y 2; puts " [expr $x/$y*8/2/2]"; output :4 but set x 5; set y 2; puts " [expr $x*8/$y/2/2]"; output: 5 Whay is your ideas? Best Regards Hamid Reza __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------- How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates.