Couple of little things I noticed with a new RELENG_7 AMD64 box (as of yesterday) ifstat from the ports cannot seem to find interfaces for some reason ? It works fine on i386 [ns8]# ifstat -b ifstat: no interfaces to monitor! [ns8]# [ns8]# ifconfig em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=19b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4> ether 00:15:17:50:40:28 inet xx.xx.128.107 netmask 0xfffffff0 broadcast 64.7.128.111 media: Ethernet 10baseT/UTP <full-duplex> status: active em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 00:15:17:50:40:29 inet 192.168.245.11 netmask 0xffffff00 broadcast 192.168.245.255 media: Ethernet autoselect (1000baseTX <full-duplex>) status: active pflog0: flags=141<UP,RUNNING,PROMISC> metric 0 mtu 33160 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 inet 127.0.0.1 netmask 0xff000000 [ns8]# snmpwalk -v1 -c xxxx ns8 .1.3.6.1.2.1.25.3.3.1 with ULE gives a bogus value HOST-RESOURCES-MIB::hrProcessorFrwID.3 = OID: SNMPv2-SMI::zeroDotZero HOST-RESOURCES-MIB::hrProcessorFrwID.8 = OID: SNMPv2-SMI::zeroDotZero HOST-RESOURCES-MIB::hrProcessorLoad.3 = INTEGER: 100 HOST-RESOURCES-MIB::hrProcessorLoad.8 = INTEGER: 100 vs using the BSD scheduler HOST-RESOURCES-MIB::hrProcessorFrwID.3 = OID: SNMPv2-SMI::zeroDotZero HOST-RESOURCES-MIB::hrProcessorFrwID.8 = OID: SNMPv2-SMI::zeroDotZero HOST-RESOURCES-MIB::hrProcessorLoad.3 = INTEGER: 0 HOST-RESOURCES-MIB::hrProcessorLoad.8 = INTEGER: 0 ---Mike -------------------------------------------------------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet since 1994 www.sentex.net Cambridge, Ontario Canada www.sentex.net/mike
Mike Tancsa wrote:> Couple of little things I noticed with a new RELENG_7 AMD64 box (as of > yesterday) > > ifstat from the ports cannot seem to find interfaces for some reason > ? It works fine on i386 > > [ns8]# ifstat -b > ifstat: no interfaces to monitor! > [ns8]#I used ifstat on my old i386 servers without problems too, indeed. Ever since I switched to 7.0 & amd64 I get the same as you. Been using slurm (ports) lately, also does the job. Regards, Hugo
On Wed, 13 Feb 2008, Hugo Silva wrote:> Mike Tancsa wrote: >> Couple of little things I noticed with a new RELENG_7 AMD64 box (as of >> yesterday) >> >> ifstat from the ports cannot seem to find interfaces for some reason ? It >> works fine on i386*snip* Try this patch. The type to the fourth argument to sysctl is wrong (int) and should be size_t. Sean -- scf@FreeBSD.org -------------- next part -------------- --- drivers.c.orig 2003-11-21 19:27:51.000000000 -0600 +++ drivers.c 2008-02-13 12:25:14.000000000 -0600 @@ -593,7 +593,8 @@ int ifcount[] = { CTL_NET, PF_LINK, NETLINK_GENERIC, IFMIB_SYSTEM, IFMIB_IFCOUNT }; - int count, size; + int count; + size_t size; size = sizeof(count); if (sysctl(ifcount, sizeof(ifcount) / sizeof(int), &count, &size, NULL, 0) < 0) { @@ -607,7 +608,7 @@ int ifinfo[] = { CTL_NET, PF_LINK, NETLINK_GENERIC, IFMIB_IFDATA, index, IFDATA_GENERAL }; - int size = sizeof(*ifmd); + size_t size = sizeof(*ifmd); if (sysctl(ifinfo, sizeof(ifinfo) / sizeof(int), ifmd, &size, NULL, 0) < 0) return 0;
At 01:40 PM 2/13/2008, Sean C. Farley wrote:>On Wed, 13 Feb 2008, Hugo Silva wrote: > >>Mike Tancsa wrote: >>>Couple of little things I noticed with a new RELENG_7 AMD64 box >>>(as of yesterday) >>>ifstat from the ports cannot seem to find interfaces for some >>>reason ? It works fine on i386 > >*snip* > >Try this patch. The type to the fourth argument to sysctl is wrong >(int) and should be size_t.Thanks! That did the trick. Should I file or PR, or can you just commit the patch ? ---Mike