[Ns-developers] Getting Negative Values for nlost_ and bytes_
L.Wood@surrey.ac.uk
L.Wood at surrey.ac.uk
Wed Jun 2 09:37:07 PDT 2010
look at ~ns/tools/loss-monitor.cc
where nlost_ and npkts_ (which is what is really overflowing, I think...) are defined as int, rather than say ulong.
But binding in ns defaults to int, even when unsigned int might make more sense.
This may be a discussion for ns-users.
L.
who has just glanced at TODO.html, seen a copy of his 1999 mail, and is freaked out.
-----Original Message-----
From: ns-developers-bounces at ISI.EDU [mailto:ns-developers-bounces at ISI.EDU] On Behalf Of Renan Manola
Sent: 01 June 2010 20:50
To: ns-developers at ISI.EDU
Subject: [Ns-developers] Getting Negative Values for nlost_ and bytes_
I have posted that bug on
http://sourceforge.net/tracker/?func=detail&aid=2970952&group_id=149743&atid=775392but
since then no one has replied. I'm not sure if that bug tracking system is acctually used by the developers, so I'm posting here.
I'm using NS to simulate a network with lots of TCP/FTP and UDP/CBR connections. I'm using the LossMonitor and /TCPSink/Sack1 for the sinks.
Using the Lossmonitor, it seems that the nlost_ variable gets some sort of overflow, at the sudden it becomes a negative value, here's an example:
time bytes_ npkts_ nlost_ ... ... ... ... ...
1092.70 44855790 213599 2145574003 504.00 44729600.0 50348800.0 0.768 1 1092.80 44862090 213629 2145985588 504.00 44736000.0 50358400.0 0.768 1 1092.90 44868600 213660 2146397173 520.80 44742400.0 50368000.0 0.768 1 1093.00 44874900 213690 2146808758 504.00 44748800.0 50377600.0 0.768 1 1093.10 44881200 213720 2147220343 504.00 44755200.0 50387200.0 0.768 1 1093.20 44887920 213752 -2147307929 537.60 44761600.0 50396800.0 0.768 1 1093.30 44894010 213781 -2146923784 487.20 44768000.0 50406400.0 0.768 1 1093.40 44900100 213810 -2146567080 487.20 44774400.0 50416000.0 0.768 1 1093.50 44906820 213842 -2146155500 537.60 44780800.0 50425600.0 0.768 1 1093.60 44913120 213872 -2145743915 504.00 44787200.0 50435200.0 0.768 1
Note the fourth colunn, something very strange happens.
I notice the same happened in the TCPSink/Sack1 at the bytes_ variable.
Another example:
time cwnd_ ... bytes_ ...
1881.30 220 220.0 2146771570 11.860363636363639 1881.40 220 218.0 2146969380 11.860363636363639 1881.50 221 225.0 2147073570 11.860363636363639 1881.60 221 221.0 2147295540 11.860363636363639 1881.70 222 222.0 2147339330 11.860363636363639 1881.80 222 219.0 -2147347106 11.860363636363639 1881.90 222 222.0 -2147310866 11.860363636363639 1882.00 223 221.0 -2147149296 11.860363636363639 1882.10 223 230.0 -2146992256 -31224.001861818189 1882.20 224 229.0 -2146990746 -31224.001861818189
Again, in the fourth colunn. It seems that after the number gets over 2 bilion 147 milion and something, it turns to negative.
At my simulation script, I just print the variable set lost [$agent_nulls($cn) set nlost_]
If anyone could send me some guidance to better debug this problem I would appreciate.
--
_______________________________
Renan Manola
Mestrando em Ciência da Computação - UFES
More information about the Ns-developers
mailing list