FreshPorts -- The Place For Ports If you buy from Amazon USA, please support us by using this link.
Follow us
Blog
Twitter

I am looking for an LTO tape library. Do you have one to spare?
Help with ports
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 net-snmp config problem
Author: nico 
Date:   23-03-04 14:02

Hi,
I'm running the latest net-snmp port under freebsd 5.2 and I can't get a correct value of tcp.tcpCurrEstab.0.

When I look at the port history, it is said that this problem was solved with the 5.0.8-2 release of the port (look in net/net-snmp) the 16 august 2003.

the problem : when I run snmpget localhost public tcp.tcpCurrEstab.0 I always get :
tcp.tcpCurrEstab.0 = Gauge32: 0
wathever the number of currently established connections.

Is tehre something special to do to get the correct value ?

any help appreciated


thanks in advance


nico

Reply To This Message
 
 Re: net-snmp config problem
Author: nutznboltz 
Date:   13-04-04 12:10

traditional tcpstats don't maintain a counter for established TCP connections. Seems that the code calls a function provided that a certain option is selected.

case TCPCURRESTAB:
#ifdef USING_MIBII_TCPTABLE_MODULE
ret_value = TCP_Count_Connections();
#else
ret_value = 0;
#endif

so you need USING_MIBII_TCPTABLE_MODULE to be defined.

--with-modules=mibII/tcpTable

please write kuriyama <-- at --> FreeBSD.org
(replace with "@")

Reply To This Message
 
 Re: net-snmp config problem
Author: nutznboltz 
Date:   13-04-04 13:13

in the Makefile change

NET_SNMP_MIB_MODULE_LIST=host disman/event-mib smux mibII/mta_sendmail ucd-snmp/diskio

to

NET_SNMP_MIB_MODULE_LIST=host disman/event-mib smux mibII/mta_sendmail ucd-snmp/diskio mibII/tcpTable

see my new PR

http://www.freebsd.org/cgi/query-pr.cgi?pr=65487

Reply To This Message
 
 Re: net-snmp config problem
Author: nutznboltz 
Date:   13-04-04 20:37

Oh, there's more too it.

In tcpTable.c

#if 0
nnew->state = StateMap[((struct xinpcb *) xig)->xt_tp.t_state];
if (nnew->state == 5 /* established */ ||
nnew->state == 8 /* closeWait */ )
tcp_estab++;
#endif

causes tcp_estab++; to never happen.

I'm experimenting with

#if 0
nnew->state = StateMap[((struct xinpcb *) xig)->xt_tp.t_state];
if (nnew->state == 5 /* established */ ||
nnew->state == 8 /* closeWait */ )
tcp_estab++;
#else
nnew->state = StateMap[((struct xtcpcb *) xig)->xt_tp.t_state];
if (nnew->state == 5 /* established */ ||
nnew->state == 8 /* closeWait */ )
tcp_estab++;
#endif

as an alternative now.

Reply To This Message
 
 Re: net-snmp config problem
Author: nutznboltz 
Date:   14-04-04 01:36

Totally fixed! Go CVSup the new patches.

Reply To This Message
 
 Re: net-snmp config problem
Author: nico 
Date:   14-04-04 08:23

Thanks a lot !

I will test it tomorow

thanks again

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.


Servers and bandwidth provided by
New York Internet, SuperNews, and RootBSD
Valid HTML, CSS, and RSS.
Copyright © 2000-2014 Dan Langille. All rights reserved.