[Orca-users] Orcallator.se crashes on GLOBAL_net[3]

Alex Kiernan alex.kiernan at gmail.com
Fri Feb 24 06:43:17 PST 2006


On 08/09/05, Kent <drizit at gmail.com> wrote:
> System is Solaris 9 on a V100 with 2 DMFE network interfaces.
>
> When running Orcallator.se I get the following (note this is the debug output).
> It appears to correctly find dmfe0/dmfe1 and then crashes when it
> increments the counter to the next interface which does not exist.
> I have set force MAX_IF in the se_defines file, I have tried a range
> of 1 to 100 and the problem still exists.
> Using SE Toolkit 3.4 with Orcallator.se 1.37.
>
> Any info/help would be greatly appreciated.
>
> i++;
> p_netstat$GLOBAL_net.number$ = i<2>
> GLOBAL_net[2] = p_netstat$GLOBAL_net(STRUCTURE)
> if (initialized<1> == <0>)
> i = number$<2>
> if ((i<2> < <0>) || (i<2> >= net_count<4>))
> now = gethrtime() * <1e-09>
> et = (now<3.08276e+07> - pnetGLOB_save_et[2]<3.08276e+07>)
> if (et<0.276099> > <1>)
> strncpy(name$<dmfe1>, pnetGLOB_save_nets[2].name$<dmfe1>, <12>)
> ipackets = pnetGLOB_net_ipackets[2]<0>
> ierrors = pnetGLOB_net_ierrors[2]<0>
> opackets = pnetGLOB_net_opackets[2]<0>
> oerrors = pnetGLOB_net_oerrors[2]<0>
> collisions = pnetGLOB_net_collisions[2]<0>
> if (opackets<0> > <0>)
> collpercent = <0>
> nocanput = pnetGLOB_net_nocanput[2]<0>
> defer = pnetGLOB_net_defer[2]<0>
> ioctets = pnetGLOB_net_ioctets[2]<0>
> ooctets = pnetGLOB_net_ooctets[2]<0>
> ifspeed = pnetGLOB_save_nets[2].ifspeed<100000000>
> iftype = pnetGLOB_save_nets[2].iftype<1>
> if (ifspeed<100000000> != <0>)
> utilization = (((ioctets<0> + ooctets<0>) * <8>) * <100>) / ifspeed<100000000>
> i++;
> p_netstat$GLOBAL_net.number$ = i<3>
> Fatal: subscript: 3 out of range for: GLOBAL_net[3]: Near line 469
>

I just got bitten by this, so I went looking... the problem is that
setoolkit counts interfaces which have ipackets and opackets in their
definition, but when netif enumerates the interfaces you get many
more. Running net.se:

Name           Ipkts       Ierrs       Opkts       Oerrs       Colls  Coll-Rate
mii                0           0           0           0           0     0.00 %
dmfe_events           0           0           0           0          
0     0.00 %
dmfe0        1014254           0      547487           1           0     0.00 %
mii          1014254           0      547487           1           0     0.00 %
dmfe_events     1014254           0      547487           1          
0     0.00 %
dmfe1              0           0           0           0           0     0.00 %

Changing the kstat definition:

< kstat struct "dmfe:" ks_dmfe_network {
---
> kstat struct "*dmfe" ks_dmfe_network {

but you still get too many:

Name           Ipkts       Ierrs       Opkts       Oerrs       Colls  Coll-Rate
dmfe_events           0           0           0           0          
0     0.00 %
dmfe0        1014389           0      547559           1           0     0.00 %
dmfe_events     1014389           0      547559           1          
0     0.00 %
dmfe1              0           0           0           0           0     0.00 %

There doesn't seem to be anyway to express a kstat structure which
excludes the additional kstat entries. Anyone any ideas, short of
hacking the source?

--
Alex Kiernan




More information about the Orca-users mailing list