Let's see, where to start.

1. If you're going to be making code changes, you really need to be tracking
the development version from the cvs.  If you send patches against 2.0 or
2.1.3, all we would do is try to apply them and junk them if they don't
work.

2. Try moving to a latter gcc if possible - I don't think I've EVER tried
ntop with something that old...

3. "Terminating Web connections..." is just a misplaced line (it's before
the #endif when it should be after).  It's only if you're running single
threaded and the fix is in the cvs.

4. ntop's memory usage depends on the # of hosts referenced on your network
by your users.  If they're running /8 port scans, you need enough memory to
hold that many hosts.  If this is versions prior to 2.1.3, well there were
some obscure memory leaks.  2.0 especially.

Back to pthreads vs. pth:

I'm afraid that it's more than just a few -lpth for -lpthreads and pth_ for
pthread_ swaps.  The Gnu pth library BEHAVES differently from POSIX threads.
Check the manual and you will see some compatible calls - those are the ones
you'll have to use.


-----Burton


-----Original Message-----
From: Jeff Rhine [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 16, 2002 10:35 AM
To: Burton M. Strauss III
Subject: RE: [Ntop] Ntop and netbsd with threads


well.. to be precise

gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)

but this is on netbsd 1.5  not 1.5.3 or even 1.6

as far as the gnu ,

yes I already ran into the rewriting of the configure.in to try and look for

-lpth instead of -lpthreads

plus the threads.h in the right location.

Plus I was also wondering about other library calls,  I attempted to
download
and try a few other threads ,but gnu seems to "try" and work the best.

I will continue my debug with the thought that that code is right and the
threads
are off

,but I kept on running into little coding errors like variables not defined
like rc , but
it was fixed in a later version, and different things like that.

I still see issues with the trace output function for Terminating web
sessions, it continuliously
spits out to the log or stdout the same thing over and over

"Terminating Web connections..."


this is why I still thought there was errors in the code that would make it
break.


Plus once I get it all working , (thinking positive)   there is still the
problem with memory, ntop
is very very memory hungry , I left it running on a machine over night and
memory was at 130 megs
and a few hours later it crashed :(

I wonder if there is a better way to manage where the data is put, like
maybe a mysql database or
options to dump stats to disks to save memory?

I have not looked at the memory routines ,but I take it there very hungry :(


over all I like the information ntop will provide ,but just got 2 issues to
over come


Jeff







At 10:05 AM 10/16/2002, you wrote:

>Is it really 2.9 or do you mean 2.95?
>
>I *think* I'm running 2.95 (Tigger is not up under NetBSD right now) - it's
>whatever "comes" with 1.5.3...
>
>I HIGHLY doubt there are errors in the code, that same code is compiled by
>gcc on well over 5 platforms.  It's a bad include or (more likely) a
missing
>dependency, unique to NetBSD/GNU Threads that the configure files aren't
>sensitive to.
>
>To say gnu pth is written for NetBSD is, I think, not quite right.  It's
>platform neutral and highly portable.
>
>However, let's get to the meat - GNU pth isn't POSIX pthreads.  So I think
>that the #include, calls, etc. aren't going to be right...
>
>If you look at the manual, http://www.gnu.org/software/pth/pth-manual.html,
>especially the API and example sections, you'll see what I mean.
>
>To make this work, you will have to (off the top of my head)
>
>1) Modify the configure.in/Makefile.am to test for the GNU pth libraries
>AHEAD of POSIX pthreads
>2) Using the #ifdef HAVE_PTH_H do a bunch of #define macros to convert the
>pthread_ calls in ntop to pth_ equivalents
>
>I think it's a lot of work.
>
>As to a more global change?  Don't even thing of a change from POSIX
>pthread_ to GNU pth_ without a serious discussion with Luca.
>
>Also, look at this if you want to be scared:
>http://www.gnu.org/software/pth/related.html
>
>
>-----Burton
>
>-----Original Message-----
>From: Jeff Rhine [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, October 16, 2002 9:46 AM
>To: Burton M. Strauss III
>Subject: RE: [Ntop] Ntop and netbsd with threads
>
>
>Thanks,
>
>i was actually thinking of doing that as I really wanted to see ntop work ,
>As I said
>the gnu threads seem to compile the best and were written for netbsd.
>
>However, now I was running into werid compiler errors after I got the
>threads lib's to
>be noticed by ntop.
>
>Either there are errors in the code or my gcc 2.9 is a little old for
>compiling ntop.
>
>what do you think?
>
>jeff
>
>
>At 07:27 AM 10/16/2002, you wrote:
>
> >Not necessarily.
> >
> >First off, you can push ahead yourself and create the necessary
patches...
> >
> >It's just that I'm reluctant to pick the "wrong" threads package.  The
> >tendency of the BSDers is to use the package/port method vs. compiling
from
> >source.
> >
> >Clearly gnu threads has better source-level support.  So if you can find
a
> >NetBSD package/port for gnu threads, it might be a better choice than
> >unproven.  And I'd be willing to give it another look.
> >
> >However, we should move any further discussion to ntop-dev...
> >
> >-----Burton
> >
> >
> >
> >-----Original Message-----
> >From: Jeff Rhine [mailto:[EMAIL PROTECTED]]
> >Sent: Tuesday, October 15, 2002 8:18 PM
> >To: Burton M. Strauss III
> >Subject: RE: [Ntop] Ntop and netbsd with threads
> >
> >
> >Thanks for the information on netbsd 1.5 and ntop.
> >
> >yes it appears there is a problem with threads on netbsd ,however the gnu
> >seem to compile and the test programs seem to run.
> >
> >Guess running threads to support netflows will not be an option for ntop
at
> >this time.
> >
> >Jeff
> >
> >
> >At 05:11 PM 10/15/2002, you wrote:
> >
> > >I have NetBSD on Tigger and occasionally I try it.  Quoting from my
> > >29Sep2002 message:
> > >
> > >"FYI: I have ntop running under NetBSD 1.5.3 on a i386, however, it's
>only
> > >single threaded.  Because of that gui response time sucks and it's a
>little
> > >fragile.
> > >
> > >There doesn't seem to be a pthread compatible library easily available
> >under
> > >NetBSD (yes, I know about unproven-threads, but it's going to take some
> >make
> > >file tweaks to make that work).
> > >
> > >-----Burton"
> > >
> > >Web searching on that message indicates it's been a problem with other
> > >packages (mySQL, Mozilla) in NetBSD and/or OpenBSD.
> > >
> > >1) The gnu POSIX threads library you've downloaded is being replaced by
a
> > >total rewrite.
> > >
> > >2) The real problem is that there isn't a "standard" POSIX threads
>package
> > >for NetBSD yet...
> > >
> > >3) The performance of all of the possible threads packages is suspect
> >anyway
> > >(the reason for unproven-threads is that Proven's package didn't work,
or
> >so
> > >the history on unproven-threads I've read says).
> > >
> > >4) Until there is a standard POSIX threads package, making ntop work
with
> > >any of the possibilities is going to require hacks. (and I doubt being
> > >really gung ho on making a bunch of configure and Makefile changes of
>that
> > >complexity).
> > >
> > >
> > >
> > >-----Burton
> > >
> > >
> > >
> > >-----Original Message-----
> > >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jeff
> > >Rhine
> > >Sent: Tuesday, October 15, 2002 3:20 PM
> > >To: [EMAIL PROTECTED]
> > >Subject: [Ntop] Ntop and netbsd with threads
> > >
> > >
> > >
> > >I have been attemping to compile ntop 2.1.51 with netbsd and threads ,
> > >netbsd does not come standard with threads so I install gnu's pthreads
> > >
> > >This gets me to the next compile issue.
> > >
> > >I get the following compiler error:
> > >
> > >what am I missing?
> > >
> > >globals.h:296: syntax error before `dequeueThreadId'
> > >globals.h:307: syntax error before `pthread_t'
> > >globals.h:314: syntax error before `pthread_t'
> > >globals.h:321: syntax error before `pthread_t'
> > >globals.h:333: syntax error before `pthread_t'
> > >globals.h:350: syntax error before `pthread_t'
> > >In file included from ntop.h:2479,
> > >                   from address.c:21:
> > >globals-core.h:278: syntax error before `*'
> > >globals-core.h:278: `createThread' declared as function returning a
> >function
> > >globals-core.h:279: syntax error before `char'
> > >globals-core.h:280: syntax error before `*'
> > >
> > >
> > >my globals looks like this:
> > >
> > >#endif /* ! USE_SEMAPHORES */
> > >
> > >    /*
> > >     * NPA - Network Packet Analyzer (main thread)
> > >     */
> > >    PthreadMutex packetQueueMutex;
> > >    pthread_t dequeueThreadId;
><==================
> > >line 296
> > >
> > >    /*
> > >     * HTS - Host Traffic Statistics
> > >     */
> > >    PthreadMutex hostsHashMutex;
> > >    u_char hostsHashMutexInitialized;
> > >
> > >    /*
> > >     * SIH - Scan Idle Hosts - optional
> > >     */
> > >    pthread_t scanIdleThreadId;
> > >
> > >    /*
> > >     * AR - Address Resolution - optional
> > >     */
> > >
> > >
> > >
> > >
> > >---
> > >Incoming mail is certified Virus Free.
> > >Checked by AVG anti-virus system (http://www.grisoft.com).
> > >Version: 6.0.394 / Virus Database: 224 - Release Date: 10/3/2002
> >
> >
> >
> >
> >---
> >Incoming mail is certified Virus Free.
> >Checked by AVG anti-virus system (http://www.grisoft.com).
> >Version: 6.0.394 / Virus Database: 224 - Release Date: 10/3/2002
>
>
>
>
>---
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.394 / Virus Database: 224 - Release Date: 10/3/2002

_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop

Reply via email to