Hi all,
I have finally identified another cause of excessive CPU usage on
freeBSD. I don't know why, but when ntop calls gethostbyaddr() for
resolving IP addresses, if the DNS does not reply (I have a DNS on Linux
and sometimes it does not reply at the first try for some addresses),
gethostbyaddr() loops (or similar), allocates memory and then ntop uses
all the CPU and no more addresses are resolved. Hence I assume this is a
bug of gethostbyaddr() on FreeBSD. I cannot use signals (like my other
apps do) for overcoming the problems, as ntop is multithreaded.

In the meantime (until the FreeBSD community fixes the bug), addresses
are resolved using /usr/bin/host via a pipe. Thanks to the patch, ntop
memory isn't growing as it used to be and CPU usage is rather low.

Now I can finally go back to my mailer: I have so many unanswered mails.

Cheers, Luca

-- 
Luca Deri                Finsiel S.p.A.
Via Matteucci 34/B       56124 Pisa, Italy.
Ph. +39/050/968.639      Fax. +39/050/968.626
Email: [EMAIL PROTECTED] WWW: http://www.tlcpi.finsiel.it/~deri/
ICQ: 68183632
Software is about stuff, about getting hands dirty - Jim Coplien

Reply via email to