[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [hobbit] ifstat and e1000g Ethernet driver



Found the problem, tested and fixed it on our Hobbit install.  In the
do_ifstat.c file, change:

static const char *ifstat_solaris_exprs[] = {
        "^[a-z]+:\\d+:([a-z0-9]+):obytes64\\s+(\\d+)",
        "^[a-z]+:\\d+:([a-z0-9]+):rbytes64\\s+(\\d+)"
};

To this:

static const char *ifstat_solaris_exprs[] = {
        "^[a-z0-9]+:\\d+:([a-z0-9]+):obytes64\\s+(\\d+)",
        "^[a-z0-9]+:\\d+:([a-z0-9]+):rbytes64\\s+(\\d+)"
};


The problem is that, before hand all interfaces only had letters in them
as the base, "dmfe", "ce", "eri", "ge", "hme", etc...  The T2000 has
some even with "ipge", this works.  The "e1000g" does not.  The change
above allows the interface now to have letters and numbers in it.  You
just need to recompile and re-install.


Any way this code change can get into the base?  I didn't bother
providing a diff as it's quite a minor change.  This just affects the
ifstat_solaris_exprs.

Thanks.

---Eric


-----Original Message-----
From: Dominique Frise [mailto:Dominique.Frise (at) unil.ch] 
Sent: Friday, August 17, 2007 08:43
To: hobbit (at) hswn.dk
Subject: Re: [hobbit] ifstat and e1000g Ethernet driver

The problem is not about active interfaces but about the name "e1000g0".
It 
will not be taked into account for creating a rrd file. This means there
is no 
ifstat.e1000g0.rrd and therefore no "Network Traffic" graph in the
trends.


Eric Meddaugh wrote:
> I've adjusted our hobbitclient-sunos.sh script.  Since that command
only
> works in the global zone (solaris 10 or higher), at the top I have:
> 
> ZONE="global"
> if [ -x "/bin/zonename" ] ; then
>    ZONE=`/bin/zonename`
> fi
> 
> Then where the kstat command is I have this, which only shows the
active
> inferfaces on the global zone.  For below solaris 10 it will consider
it
> a global zone and it works there too: (the LINE= is suppose to be all
1
> line).
> 
> if [ "${ZONE}" = "global" ] ; then
>    echo "[ifstat]"
>    LINE=`/sbin/ifconfig -a | /bin/egrep RUNNING | /bin/awk -F':'
> '{printf $1"\n"}' | /bin/sort -u | /bin/awk '{printf $1"|"}'`
>    /usr/bin/kstat -p -s '[or]bytes64' | sort | egrep "${LINE}"
>    #/usr/bin/kstat -p -s '[or]bytes64' | sort
> fi
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Dominique Frise [mailto:Dominique.Frise (at) unil.ch] 
> Sent: Friday, August 17, 2007 06:28
> To: hobbit (at) hswn.dk
> Subject: [hobbit] ifstat and e1000g Ethernet driver
> 
> Hi,
> 
> The solaris regular expression in hobbitd/rrd/do_ifstat.c (Hobbit
4.2.0)
> does 
> not work for the "e1000g" Ethernet driver found on certain Sparc T2000
> system.
> 
> 
> Output of the command for ifstat:
> 
> $ /usr/bin/kstat -p -s '[or]bytes64' | sort
> e1000g0:0:e1000g0/0:obytes64    868907104315
> e1000g0:0:e1000g0/0:rbytes64    111199067849
> e1000g:0:e1000g0:obytes64       868906791580
> e1000g:0:e1000g0:rbytes64       111199060552
> e1000g1:0:e1000g1/0:obytes64    0
> e1000g1:0:e1000g1/0:rbytes64    0
> e1000g2:0:e1000g2/0:obytes64    0
> e1000g2:0:e1000g2/0:rbytes64    0
> e1000g3:0:e1000g3/0:obytes64    0
> e1000g3:0:e1000g3/0:rbytes64    0
> 
> 
> Dominique
> UNIL - University of Lausanne
> 
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe (at) hswn.dk
> 
> 
> 
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe (at) hswn.dk
> 
> 


Dominique
UNIL - University of Lausanne

To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe (at) hswn.dk