|
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
|
|
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
|
|
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
|
|
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
|
|
Author: nico
Date: 14-04-04 08:23
Thanks a lot !
I will test it tomorow
thanks again
|
|
Reply To This Message
|
|