--- Matt Massie <[EMAIL PROTECTED]> wrote:
> On Tue, 2004-02-10 at 00:02, Martin Knoblauch wrote:
> 
> 
> 
> struct ifi_info *info, *n;
> 
> info = Get_ifi_info(AF_INET, 0);
> 
> for(n = info; n; n = n->ifi_next)
>   {
>      /* process the info you are interested in here
>          n->ifi_flags will have all the IFF_xxx flags
>        */
>   }
> free_ifi_info(info);
>Matt,

 after converting solaris.c to the new interface loop, I found (after
about 20 minutes of running gmond) that "get_ifi_info()", which is
called from "Get_ifi_info()" is leaking sockets/file-descriptors. One
needs to add a:

close(sockfd);

line just before return-ing from get_ifi_info. One should also check
the return value of the Socket call, of course :-)

 The problem is likely to manifest on other platforms also, but much
slower. (mtu func is called every 1200 secs, while the byte/packet
counters are called at least every 90 secs).

 Once you have established CVS access for me, I can commit a fixed
version.

Cheers
Martin


=====
------------------------------------------------------
Martin Knoblauch
email: k n o b i AT knobisoft DOT de
www:   http://www.knobisoft.de

Reply via email to