Hi Luca,

On 32 bit architecture OS  I see overflow issues I don't see
the issue on a 64 bit architecture OS system. Note both systems are
capable of 64bit - but one has a i686 32bit Linux OS installed the other has a
x86_64 64 bit Linux OS.

It looks like lua-jit compiles itself for 64bit or 32bit integers depending on 
the
architecture it finds.

I changed the following and it appears to work now on 32 architecture.
void lua_push_int_table_entry(lua_State *L, const char *key, u_int64_t value) {
  lua_pushstring(L, key);
//  lua_pushinteger(L, value);
  lua_pushnumber(L, value);
  lua_settable(L, -3);
}

Don't know what the side effects are though.
Doing more testing with above change.
Here is output on 32bit architecture with above change.

(Router) MAC Address    00:50:FC:FB:35:58
IP Address      10.0.129.11
Name    10.0.129.11 <http://10.0.129.11> Local
First Seen      06/03/13 13:37:46 [00:20:58 ago]
Last Seen       06/03/13 13:57:43 [00:00:01 ago]
Sent vs Received Traffic Breakdown      
Sent
Rcvd
Traffic Sent    5,200,441 Pkts / 6.26 GB
Traffic Received        2,634,294 Pkts / 168.08 MB

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Regards,
Steve


On 06/03/2013 10:46 AM, Steve Clark wrote:
Hi Luca,

I modified host_details.lua to be:

   print("<tr><th>Traffic Sent</th><td>" .. formatPackets(host["pkts.sent"]) .. " / ".. 
host["bytes.sent"] .. "</td></tr>\n")
   print("<tr><th>Traffic Received</th><td>" .. formatPackets(host["pkts.rcvd"]) .. " / ".. 
host["bytes.rcvd"] .. "</td></tr>\n")

And this is what I get
(Router) MAC Address    FC:99:47:8C:64:00
IP Address      10.254.100.170
Name    dd2.local.intrasp.com <http://dd2.local.intrasp.com> Local
First Seen      06/03/13 10:32:54 [00:10:42 ago]
Last Seen       06/03/13 10:42:35 [00:00:01 ago]
Sent vs Received Traffic Breakdown      
Traffic Sent    2,881,194 Pkts / 256861110
Traffic Received        5,579,201 Pkts / -1470723800



On 06/03/2013 07:27 AM, Steve Clark wrote:
Hi Luca,

As you can see from the table below - this host had received 15 million packets
in 28 minutes. Actually the counters had already wrapped once. I'll see if I 
can setup
a controlled environment to reproduce the problem.

I am running on CentOS 6.3 32bit - but I would expect if the counters are 64 
bit that wouldn't matter.

Are there any data stores I should clear? I have been rm'ing the rrd directory.


I see in Lua.h where you are using u_int64.
I see in Lua.cpp static int ntop_process_flow() the bytes and packets are only 
32 bit.

(Router) MAC Address    FC:99:47:8C:64:00
IP Address      10.254.100.170
Name    dd2.local.intrasp.com <http://dd2.local.intrasp.com> Local
First Seen      06/03/13 06:54:33 [00:28:10 ago]
Last Seen       06/03/13 07:22:42 [00:00:01 ago]
Sent vs Received Traffic Breakdown      
Traffic Sent    8,002,036 Pkts / 679.97 MB
Traffic Received        15,634,670 Pkts / -1517166050 B

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
© ntop.org <http://www.ntop.org> - 1998-2013
Generated by ntopng 0.1 (r6338)
100.4 Mbps [1544 hosts][2527 flows]


On 06/03/2013 04:02 AM, Luca Deri wrote:
Steve
I have tested using large counters and it worked for me. CAn you please tell me 
how to reproduce the problem?

Regards Luca

On Jun 3, 2013, at 2:46 AM, Steve Clark <[email protected] 
<mailto:[email protected]>> wrote:

Hi Luca,

Was this suppose to fix the 32bit overflow problem?

Because it doesn't seem to. The network I am monitoring is running at
93.5 Mbps [1365 hosts][2096 flows] or higher.

Regards,
Steve

On 06/02/2013 10:52 AM, [email protected] wrote:
Author: deri
Date: 2013-06-02 16:52:37 +0200 (Sun, 02 Jun 2013)
New Revision: 6336

Modified:
    trunk/ntopng/Lua.cpp
    trunk/ntopng/Lua.h
Log:
Fix for counters overflooding 32 bit (often they are present on high-speed 
links)


_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev




--
Stephen Clark
*NetWolves*
Director of Technology
Phone: 813-579-3200
Fax: 813-882-0209
Email: [email protected]
http://www.netwolves.com
_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev

Reply via email to