Hi Kyrre, snmpwalk will return the whole snmp table. snmpwalk will start from a top-level oid and will walk down until the tree is exhausted, that's why you get the 45 lines.
You will need to pick the proper line of the snmpwalk for the related interface and do single snmpgets using the complete oid. Example snmpwalk ciscobox community (snippet) system.sysDescr.0 = Cisco Internetwork Operating System Software IOS (tm) 2500 Software (C2500-IOS56I-L), Version 12.1(5)T, RELEASE SOFTWARE (fc1) Copyright (c) 1986-2000 by cisco Systems, Inc. Compiled Sat 11-Nov-00 07:45 by ccai system.sysObjectID.0 = OID: enterprises.9.1.154 system.sysUpTime.0 = Timeticks: (5987166) 16:37:51.66 system.sysContact.0 = system.sysName.0 = system.sysLocation.0 = system.sysServices.0 = 78 system.sysORLastChange.0 = Timeticks: (0) 0:00:00.00 interfaces.ifNumber.0 = 19 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< number of interfaces in the box next, you will see several lists of snmp oid per interface. Below you will find the most important ones (example) interfaces.ifTable.ifEntry.ifDescr.1 = Ethernet0 interfaces.ifTable.ifEntry.ifSpeed.1 = Gauge: 10000000 interfaces.ifTable.ifEntry.ifAdminStatus.1 = up(1) interfaces.ifTable.ifEntry.ifOperStatus.1 = up(1) interfaces.ifTable.ifEntry.ifInOctets.1 = 867559 interfaces.ifTable.ifEntry.ifOutOctets.1 = 159665 So, use an snmpwalk to your device. Search for the interface names you want to monitor (Ethernet0 in this example). Look for the number on the interfaces.ifTable.ifEntry.ifDescr line (in our case 1) and then do an snmpget device community interfaces.ifTable.ifEntry.ifInOctets.1 and interfaces.ifTable.ifEntry.ifOutOctets.1 Please note that the numbers sampled are octets (bytes) so in order to display bits, you will have to multiply by 8. And please.... change the default communities 'public and private' to something else......... hth paul *speaking for himself "Kyrre Baker" <"kyrre+lists"@dvdkb.net> on 09-08-2001 05:39:04 To: "RRD users" <[email protected]> cc: (bcc: Paul Pot) Subject: [rrd-users] Cisco 677i-DIR (cbos 2.4.2) I want to "loose" the MRTG stuff and generate the data pure "RRD + PHP". The only problem I`ve got is that i don`t know the OID to use for my Cisco 677i-DIR (cbos 2.4.2). Today i use (via MRTG) >> 2:[EMAIL PROTECTED] << but an snmpwalk on "2" here gives me to many lines. snmpget cisco_gw public 2: Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: interfaces snmpwalk cisco_gw public 2: gives 45 lines with different data. I want to graph the incomming + outgoing traffic on wan0-0 Anyone knows what to use? -- Kyrre Baker <URL: http://mrtg.dvdkb.net/ > -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
