Xymon Mailing List Archive search

ifstat and e1000g Ethernet driver

7 messages in this thread

list Dominique Frise · Fri, 17 Aug 2007 12:27:46 +0200 ·
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
list Eric Meddaugh · Fri, 17 Aug 2007 07:50:31 -0400 ·
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
quoted from Dominique Frise


-----Original Message-----
From: Dominique Frise [mailto:user-78ab6673b600@xymon.invalid] 
Sent: Friday, August 17, 2007 06:28
To: user-ae9b8668bcde@xymon.invalid
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
list Dominique Frise · Fri, 17 Aug 2007 14:43:09 +0200 ·
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.
quoted from Eric Meddaugh


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:user-78ab6673b600@xymon.invalid] Sent: Friday, August 17, 2007 06:28
To: user-ae9b8668bcde@xymon.invalid
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

Dominique
UNIL - University of Lausanne
list Eric Meddaugh · Wed, 5 Sep 2007 14:23:59 -0400 ·
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
quoted from Dominique Frise


-----Original Message-----
From: Dominique Frise [mailto:user-78ab6673b600@xymon.invalid] 
Sent: Friday, August 17, 2007 08:43
To: user-ae9b8668bcde@xymon.invalid
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:user-78ab6673b600@xymon.invalid] 
Sent: Friday, August 17, 2007 06:28
To: user-ae9b8668bcde@xymon.invalid
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

Dominique
UNIL - University of Lausanne
list Henrik Størner · Wed, 5 Sep 2007 23:39:00 +0200 ·
quoted from Eric Meddaugh
On Wed, Sep 05, 2007 at 02:23:59PM -0400, Eric Meddaugh wrote:
Found the problem, tested and fixed it on our Hobbit install.
[snip]
Any way this code change can get into the base ?
Yep, done.


Henrik
list Keith W. Meserole · Wed, 05 Sep 2007 18:58:26 -0400 ·
Hi all,

In Hobbit 4.2.0 is there a way to set up a test from an internal network
to test http of an outside host, such as a DSL router?   Cavaet:  A
proxy server is required to get out and also the DSL is a dynamic IP.
This is on Solaris 10.

I currently have a line similar to this in the bbhost file.   NSLOOKUP
to the real host name works but ping fails (of course) since there is no
host file entry.

0.0.0.0 DSL1 # noconn https://dsl1.dyndns.biz:8080

Can anyone provide a detailed example of how to accomplish this?
list Ralph Mitchell · Wed, 5 Sep 2007 22:36:31 -0500 ·
quoted from Keith W. Meserole
On 9/5/07, Meserole, Keith W. <user-73279f70f6bb@xymon.invalid> wrote:
Hi all,

In Hobbit 4.2.0 is there a way to set up a test from an internal network
to test http of an outside host, such as a DSL router?   Cavaet:  A
proxy server is required to get out and also the DSL is a dynamic IP.
This is on Solaris 10.

I currently have a line similar to this in the bbhost file.   NSLOOKUP
to the real host name works but ping fails (of course) since there is no
host file entry.

0.0.0.0 DSL1 # noconn https://dsl1.dyndns.biz:8080

Can anyone provide a detailed example of how to accomplish this?
Dunno about using proxies in Hobbit web tests, but I've had a lot of
success with external scripts using curl:

   curl -x http://proxy.domain.com:80/ -o page.html https://dsl1.dyndns.biz:8080

then examine page.html to see if it contains something you expect to see.

Ralph Mitchell