The hash should be large enough to hold 45 vlans. Sounds like something's wrong - probably need to get Luca involved.
-----Burton -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Tony Hernandez Sent: Thursday, February 27, 2003 7:49 AM To: [EMAIL PROTECTED] Subject: RE: [Ntop] updateElementHash(): hash full! Sorry, around 9,000 hosts as confirmed by my boss. and 45 vlans but very many subnets. What do you suggest the has size should be in this instance? -----Original Message----- From: Tony Hernandez Sent: Thursday, February 27, 2003 7:38 AM To: [EMAIL PROTECTED] Subject: RE: [Ntop] updateElementHash(): hash full! A lot. I'll get back to you on that number... Last I knew we had over 6,500 hosts. -----Original Message----- From: Burton M. Strauss III [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 26, 2003 10:44 PM To: [EMAIL PROTECTED] Subject: RE: [Ntop] updateElementHash(): hash full! Yeah ... how many dang ASs or VLANs are you monitoring anyway? -----Burton -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Tony Hernandez Sent: Wednesday, February 26, 2003 8:39 PM To: [EMAIL PROTECTED] Subject: RE: [Ntop] updateElementHash(): hash full! So, I can try increasing the hash size in globals-defines.h, recompile and you think it will stop with the messages about that? - unless it fills up again that is. -----Original Message----- From: Burton M. Strauss III [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 26, 2003 4:37 PM To: [EMAIL PROTECTED] Subject: RE: [Ntop] updateElementHash(): hash full! static void updateElementHashItem(ElementHash **theHash, u_short srcId, u_short dstId, Counter numPkts, Counter numBytes, u_char dataSent) { u_int myIdx = 0, idx = srcId % MAX_ELEMENT_HASH; ElementHash *hash, *prev; while(1) { if((theHash[idx] == NULL) || (theHash[idx]->id == srcId)) break; idx = (idx+1) % MAX_ELEMENT_HASH; if(++myIdx == MAX_ELEMENT_HASH) { traceEvent(CONST_TRACE_WARNING, "updateElementHash(): hash full!"); return; } } Basically, it's not finding an empty or matching element in the hash table... The hash limit is set in globals-defines.h: /* * Size of the AS and VLAN hashes, created by allocateElementHash() and dumped by * dumpElementHash(). */ #define MAX_ELEMENT_HASH 4096 I know of no reason you couldn't make it larger - it's a memory trade off. If it allocates anything, it allocates that many entries void allocateElementHash(int deviceId, u_short hashType) { int memLen = sizeof(ElementHash*)*MAX_ELEMENT_HASH; switch(hashType) { case 0: /* AS */ if(myGlobals.device[deviceId].asHash == NULL) { myGlobals.device[deviceId].asHash = (ElementHash**)malloc(memLen); memset(myGlobals.device[deviceId].asHash, 0, memLen); } break; case 1: /* VLAN */ if(myGlobals.device[deviceId].vlanHash == NULL) { myGlobals.device[deviceId].vlanHash = (ElementHash**)malloc(memLen); memset(myGlobals.device[deviceId].vlanHash, 0, memLen); } break; } } (All code from util.c) -----Burton |\ _,,,---,,_ "If I purr, you must have fed me. /,`.-'`' -. ;-;;,_ If the network purrs, it must <|,4- ) )-,_..;\ ( `'-' be ntop!" -----Pixel '---''(_/--' `-'\_) -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Tony Hernandez Sent: Wednesday, February 26, 2003 2:38 PM To: [EMAIL PROTECTED] Subject: [Ntop] updateElementHash(): hash full! Hey all, I am running Ntop v2.1.55 ( latest snap wont compile ) I get these messages in the log: Feb 26 15:22:06 graback ntop[209]: updateElementHash(): hash full! Feb 26 15:22:30 graback last message repeated 1484 times Feb 26 15:22:46 graback last message repeated 1100 times Feb 26 15:22:46 graback ntop[209]: WARNING: accessMutex() call with a self-LOCKED mutex [from 209 at pbuf.c:551 updateInterfacePorts] As you can see, they happen a LOT. I just got netflows running on it, and sometimes it just bombs without a trace, not leaving much in the line of *why it crashed in the logs not really much debug. Seems to run ok when its not listening for netflows tho. anyone have a clue about this or experiences ? This is all the logs say when it dumps - Feb 26 15:27:26 graback /kernel: pid 209 (ntop), uid 65534: exited on signal 11 Feb 26 15:27:26 graback /kernel: dc0: promiscuous mode disabled -- Tony Hernandez (53:61:72:67:65:6E:74) Computer Programmer Analyst Division of Housing University of Florida "All your base are belong to us!" - Zero Wing _______________________________________________ Ntop mailing list [EMAIL PROTECTED] http://listgateway.unipi.it/mailman/listinfo/ntop _______________________________________________ Ntop mailing list [EMAIL PROTECTED] http://listgateway.unipi.it/mailman/listinfo/ntop _______________________________________________ Ntop mailing list [EMAIL PROTECTED] http://listgateway.unipi.it/mailman/listinfo/ntop _______________________________________________ Ntop mailing list [EMAIL PROTECTED] http://listgateway.unipi.it/mailman/listinfo/ntop _______________________________________________ Ntop mailing list [EMAIL PROTECTED] http://listgateway.unipi.it/mailman/listinfo/ntop _______________________________________________ Ntop mailing list [EMAIL PROTECTED] http://listgateway.unipi.it/mailman/listinfo/ntop _______________________________________________ Ntop mailing list [EMAIL PROTECTED] http://listgateway.unipi.it/mailman/listinfo/ntop
