Intel Pro/1000 under solaris 8 x86 breaks the
interfaces mib. When you do an snmpwalk
on 'interfaces' the snmpd returns back the following:
interfaces.ifNumber.0 = 11
And then exists. I did some debugging of the whole
process and what is happening is that the snmpd is
sending back the first entry in the at table as the
next item (which tells snmpwalk that it is done).
Anyone seen this before? Any help would be
appreciated. :)
Thanks,
Michael Douglass
Texas Networking, Inc.
Logged In: YES
user_id=93926
Hmm. Strange. What exact command were you using? What
happens if you snmpwalk ifTable? What version of the
package was this? Does the same thing happen with version
4.2.3?
Logged In: NO
This does happen under 4.2.3 yes.
The command:
snmpwalk -v 1 myhost.here.com myCommunity interfaces
Logged In: YES
user_id=93926
Does snmpwalk ifTable work? What is the output if so?
Logged In: NO
Found the problem. The card does not have 'oerrors' as a
kernel variable in kstat. The following patch fixes that
as well as correctly grabbing the traffic counters from
this card. I also added DEBUG output when something like
this happens so that the next guy who runs into a problem
like this can easily find the point of error:
(user) system:/tmp/ucd-snmp-4.2.3# diff -c ~/ucd-snmp-
4.2.3/agent/mibgroup/kernel_sunos5.c
agent/mibgroup/kernel_sunos5.c
*** /home/user/ucd-snmp-
4.2.3/agent/mibgroup/kernel_sunos5.c Thu Nov 29
15:25:36 2001
--- agent/mibgroup/kernel_sunos5.c Fri Jan 4 12:13:41
2002
***************
*** 781,788 ****
case 'h': /* hme (SBus card) */
case 'e': /* eri (PCI card) */
case 'b': /* be */
! if (!ifp->ifSpeed) ifp->ifSpeed = 100000000;
! ifp->ifType = 6;
break;
case 'f': /* fa (Fore ATM */
if (!ifp->ifSpeed) ifp->ifSpeed = 155000000;
--- 781,793 ----
case 'h': /* hme (SBus card) */
case 'e': /* eri (PCI card) */
case 'b': /* be */
! if (ifrp->ifr_name[0] == 'e' && ifrp->ifr_name
[1] == '1') {
! ifp->ifType = 1;
! ifp->ifSpeed = 1000000000;
! } else {
! if (!ifp->ifSpeed) ifp->ifSpeed = 100000000;
! ifp->ifType = 6;
! }
break;
case 'f': /* fa (Fore ATM */
if (!ifp->ifSpeed) ifp->ifSpeed = 155000000;
***************
*** 805,828 ****
Counter l_tmp;
if (getKstat(ifrp->ifr_name, "ipackets", &ifp-
>ifInUcastPkts) < 0) {
ret = -1;
goto Return;
}
! if (getKstat(ifrp->ifr_name, "rbytes", &ifp-
>ifInOctets) < 0)
ifp->ifInOctets = ifp->ifInUcastPkts *
308; /* XXX */
if (getKstat(ifrp->ifr_name, "opackets", &ifp-
>ifOutUcastPkts) < 0) {
ret = -1;
goto Return;
}
! if (getKstat(ifrp->ifr_name, "obytes", &ifp-
>ifOutOctets) < 0)
ifp->ifOutOctets = ifp->ifOutUcastPkts *
308; /* XXX */
if (ifp->ifType == 24) /* Loopback
*/
continue;
if (getKstat(ifrp->ifr_name, "ierrors", &ifp-
>ifInErrors) < 0) {
ret = -1;
goto Return;
}
! if (getKstat(ifrp->ifr_name, "oerrors", &ifp-
>ifOutErrors) < 0) {
ret = -1;
goto Return;
}
if (getKstat(ifrp->ifr_name, "brdcstrcv", &ifp-
>ifInNUcastPkts) == 0
--- 810,843 ----
Counter l_tmp;
if (getKstat(ifrp->ifr_name, "ipackets", &ifp-
>ifInUcastPkts) < 0) {
ret = -1;
+ DEBUGMSGTL(("kernel_sunos5", "%s Does not
have ipackets\n",ifrp->ifr_name));
goto Return;
}
! if (getKstat(ifrp->ifr_name, "rbytes", &ifp-
>ifInOctets) < 0 &&
! getKstat(ifrp-
>ifr_name, "Ttl_Octets_Rcvd_Lo",
! &ifp->ifInOctets) < 0 )
ifp->ifInOctets = ifp->ifInUcastPkts *
308; /* XXX */
if (getKstat(ifrp->ifr_name, "opackets", &ifp-
>ifOutUcastPkts) < 0) {
ret = -1;
+ DEBUGMSGTL(("kernel_sunos5", "%s Does not
have opackets\n",ifrp->ifr_name));
goto Return;
}
! if (getKstat(ifrp->ifr_name, "obytes", &ifp-
>ifOutOctets) < 0 &&
! getKstat(ifrp-
>ifr_name, "Ttl_Octets_Xmtd_Lo",
! &ifp->ifOutOctets) < 0 )
ifp->ifOutOctets = ifp->ifOutUcastPkts *
308; /* XXX */
if (ifp->ifType == 24) /* Loopback
*/
continue;
if (getKstat(ifrp->ifr_name, "ierrors", &ifp-
>ifInErrors) < 0) {
ret = -1;
+ DEBUGMSGTL(("kernel_sunos5", "%s Does not
have ierrors\n",ifrp->ifr_name));
goto Return;
}
! if (getKstat(ifrp->ifr_name, "oerrors", &ifp-
>ifOutErrors) < 0 &&
! getKstat(ifrp->ifr_name, "Total Send", &ifp-
>ifOutErrors) < 0 )
! {
ret = -1;
+ DEBUGMSGTL(("kernel_sunos5", "%s Does not
have oerrors\n",ifrp->ifr_name));
goto Return;
}
if (getKstat(ifrp->ifr_name, "brdcstrcv", &ifp-
>ifInNUcastPkts) == 0
***************
*** 839,844 ****
--- 854,860 ----
*/
if (ioctl(ifsd, SIOCGIFADDR, ifrp) < 0) {
ret = -1;
+ DEBUGMSGTL(("kernel_sunos5", "%s
SIOCGIFADDR FAILED\n", ifrp->ifr_name));
goto Return;
}
if (getMibstat(MIB_IP_NET, &Media, sizeof
(mib2_ipNetToMediaEntry_t),
Logged In: YES
user_id=93926
This fix is a bit specific to your exact system setup,
unfortunately.
Logged In: YES
user_id=80318
this bug is similar to bug#699319
is the ifNumber correct?
does snmpd exit or crash?
if crash: can you attach a gdb backtrace to this bugtrack?