[Ntop] updateElementHash(): hash full!
Tony Hernandez
ntop@unipi.it
Thu, 27 Feb 2003 08:48:52 -0500
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=20
Sent: Thursday, February 27, 2003 7:38 AM
To: ntop@Unipi.IT
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:Burton@ntopsupport.com]=20
Sent: Wednesday, February 26, 2003 10:44 PM
To: ntop@Unipi.IT
Subject: RE: [Ntop] updateElementHash(): hash full!
Yeah ... how many dang ASs or VLANs are you monitoring anyway?
-----Burton
-----Original Message-----
From: ntop-admin@unipi.it [mailto:ntop-admin@unipi.it]On Behalf Of Tony
Hernandez
Sent: Wednesday, February 26, 2003 8:39 PM
To: ntop@Unipi.IT
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:Burton@ntopsupport.com]=20
Sent: Wednesday, February 26, 2003 4:37 PM
To: ntop@Unipi.IT
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 =3D 0, idx =3D srcId % MAX_ELEMENT_HASH;
ElementHash *hash, *prev;
while(1) {
if((theHash[idx] =3D=3D NULL) || (theHash[idx]->id =3D=3D srcId))
break;
idx =3D (idx+1) % MAX_ELEMENT_HASH;
if(++myIdx =3D=3D 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 =3D sizeof(ElementHash*)*MAX_ELEMENT_HASH;
switch(hashType) {
case 0: /* AS */
if(myGlobals.device[deviceId].asHash =3D=3D NULL) {
myGlobals.device[deviceId].asHash =3D =
(ElementHash**)malloc(memLen);
memset(myGlobals.device[deviceId].asHash, 0, memLen);
}
break;
case 1: /* VLAN */
if(myGlobals.device[deviceId].vlanHash =3D=3D NULL) {
myGlobals.device[deviceId].vlanHash =3D
(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: ntop-admin@unipi.it [mailto:ntop-admin@unipi.it]On Behalf Of Tony
Hernandez
Sent: Wednesday, February 26, 2003 2:38 PM
To: ntop@Unipi.IT
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
Ntop@unipi.it
http://listgateway.unipi.it/mailman/listinfo/ntop
_______________________________________________
Ntop mailing list
Ntop@unipi.it
http://listgateway.unipi.it/mailman/listinfo/ntop
_______________________________________________
Ntop mailing list
Ntop@unipi.it
http://listgateway.unipi.it/mailman/listinfo/ntop
_______________________________________________
Ntop mailing list
Ntop@unipi.it
http://listgateway.unipi.it/mailman/listinfo/ntop
_______________________________________________
Ntop mailing list
Ntop@unipi.it
http://listgateway.unipi.it/mailman/listinfo/ntop