Read the code ... it's not a matter of optimizing, it's a matter of
disabling features.
$ grep --line-number -A5 myGlobals.largeNetwork *.c
hash.c:778: if(!myGlobals.largeNetwork)
hash.c-779- el->portsUsage = (PortUsage**)calloc(sizeof(PortUsage*),
MAX_ASSIGNED_IP_PORTS);
hash.c-780-
hash.c-781- len =
(size_t)myGlobals.numIpProtosToMonitor*sizeof(ProtoTrafficInfo);
hash.c-782- if ( (el->protoIPTrafficInfos =
(ProtoTrafficInfo*)malloc(len)) == NULL) return;
hash.c-783- memset(el->protoIPTrafficInfos, 0, len);
--
http.c:1473: && (!myGlobals.largeNetwork) /*
http.c-1474- On a large network we probably
use a lot of memory
http.c-1475- so a fork() will require even
more memory and this
http.c-1476- is not what we want
http.c-1477- */
http.c-1478- ) {
--
pbuf.c:491: if(!myGlobals.largeNetwork) {
pbuf.c-492- if(srcHost->trafficDistribution == NULL)
srcHost->trafficDistribution = calloc(1, sizeof(TrafficDistribution));
pbuf.c-493- if(dstHost->trafficDistribution == NULL)
dstHost->trafficDistribution = calloc(1, sizeof(TrafficDistribution));
pbuf.c-494-
incrementTrafficCounter(&srcHost->trafficDistribution->last24HoursBytesSent[
hourId], length.value);
pbuf.c-495-
incrementTrafficCounter(&dstHost->trafficDistribution->last24HoursBytesRcvd[
hourId], length.value);
pbuf.c-496- }
-----Burton
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
Pietro Bandera
Sent: Monday, March 31, 2003 1:05 AM
To: [EMAIL PROTECTED]
Subject: [Ntop] Ntop -C
Ciao all
I would like to know why ntop has the feature for optimizing the
sniffing on a large network as an option and not "built-in" as a
standard feature.
In fact because this options gives ntop a better handle of hash size and
memory, why should not it help even on a SMALL network? :)
Please let me know
Thanks
Ciao
Pietro
_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop
_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop