nv-l
[Top] [All Lists]

Re: Instances

To: nv-l@lists.tivoli.com
Subject: Re: Instances
From: Ray Schafer <schafer@tkg.com>
Date: Tue, 21 Mar 2000 09:38:15 -0600
Jean.M.SCHMIDT@odot.state.or.us wrote:

> How do I know which instance relates to which interface?

Here is a way to do it:

If  the INDEX variable is set to the index of the interface, and NODE is the
IP address or hostname of the node, this will return the name of the
interface:

     snmpget  $NODE .1.3.6.1.2.1.2.2.1.2.$INDEX

It used the interface description MIB.

If you want to get the IP address of the interface (assuming there is one -
there doesn't have to be!)

     snmpwalk $NODE .1.3.6.1.2.1.4.20.1.2 | grep "INTEGER: $INDEX"\
           | cut -d. -f5-8 | cut -f1 -d:

Hope that helps..



--
Ray Schafer                   | schafer@tkg.com
The Kernel Group              | Distributed Systems Management
http://www.tkg.com


<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web