From owner-freebsd-net@FreeBSD.ORG Fri Jun 22 06:50:58 2012 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44278106566B for ; Fri, 22 Jun 2012 06:50:58 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id AAF488FC08 for ; Fri, 22 Jun 2012 06:50:57 +0000 (UTC) Received: by lbon10 with SMTP id n10so3882540lbo.13 for ; Thu, 21 Jun 2012 23:50:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:organization:references:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=YMmdzM/5E+eFHtI8q3cjLp3jT0KYwDZaPEuflYLM3OI=; b=nShkeFFeNicDthnYqOBwBohM/5Nkjt5FgKcDJfBHnY1b155gr0LT5jgxjs0RrIZqFS C6IGrg4Ba4CUcs09gwq9lnxRXSuREZissyLQ7OFymCaDAWIQCuXcdBbFSulIMJazAkLx SUk6a3BAFVy1phNWlqMsS4MHioazC7QHvXQceZw4OREbh2zMUokT+gZ70qYFnC/EHLhq zHnFD5gbPHF2JOaYuAqTyu3IUTiWh7RsSJxO58L47A6sNldTZgLo5YOWYyC20eo0xjIX y4Dn3C8nzTG/mAVKh5MhurlTuRXAeAJeFGODOFwc68nzksbZsVaFGBJhONygELJrdNeA hfHQ== Received: by 10.152.125.116 with SMTP id mp20mr986472lab.19.1340347851452; Thu, 21 Jun 2012 23:50:51 -0700 (PDT) Received: from localhost ([188.230.122.226]) by mx.google.com with ESMTPS id b3sm20245051lbh.6.2012.06.21.23.50.48 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Jun 2012 23:50:49 -0700 (PDT) From: Mikolaj Golub To: Eugene Grosbein Organization: TOA Ukraine References: <4FC5A9AF.1000003@rdtc.ru> <86lik9foup.fsf@kopusha.home.net> <4FE31245.8020406@grosbein.pp.ru> Sender: Mikolaj Golub Date: Fri, 22 Jun 2012 09:50:46 +0300 In-Reply-To: <4FE31245.8020406@grosbein.pp.ru> (Eugene Grosbein's message of "Thu, 21 Jun 2012 19:23:33 +0700") Message-ID: <86k3yzc01l.fsf@in138.ua3> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "net@freebsd.org" Subject: Re: bsnmp and HOST-RESOURCES-MIB X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2012 06:50:58 -0000 On Thu, 21 Jun 2012 19:23:33 +0700 Eugene Grosbein wrote: EG> Hi! EG> bsnmpd(1) has /usr/lib/snmp_hostres.so module in base system EG> for HOST-RESOURCES-MIB implementation. What should I do to make EG> bsnmpwalk -v 2c -s comm@localhost 1.3.6.1.2.1.25.3.3.1.2 EG> work without complaining: EG> bsnmpwalk: Invalid OID - 1.3.6.1.2.1.25.3.3.1.2 EG> OID parsing error - 1.3.6.1.2.1.25.3.3.1.2 EG> And without "-n" flag, please :-) EG> I'd like it to resolve OIDs to their names. I am not very familiar with bsnmptools. Experimenting, I have found such combinations working: in138:~% bsnmpwalk -v 1 -s public@localhost -i hostres_tree.def 'hrProcessorTable' hrProcessorFrwID[5] = 0.0 hrProcessorFrwID[10] = 0.0 hrProcessorLoad[5] = 7 hrProcessorLoad[10] = 5 in138:~% bsnmpget -v 1 -s public@localhost -i hostres_tree.def 'hrProcessorLoad.5' hrProcessorLoad[5] = 8 Note, you should explicitly specify hostres_tree.def (from /usr/share/snmp/defs) for bsnmptools to be able to resolve name (no idea why). Unfortunately, bsnmpwalk does not work for hrProcessorLoad: in138:~% bsnmpwalk -v 1 -s public@localhost -i hostres_tree.def 'hrProcessorLoad' bsnmpwalk: Snmp dialog - Operation timed out Athough it works for the numerical format: in138:~% bsnmpwalk -v 1 -s public@localhost '1.3.6.1.2.1.25.3.3.1.2' 1.3.6.1.2.1.25.3.3.1.2.5 = 10 1.3.6.1.2.1.25.3.3.1.2.10 = 10 in138:~% bsnmpwalk -v 1 -s public@localhost -i hostres_tree.def '1.3.6.1.2.1.25.3.3.1.2' hrProcessorLoad[5] = 10 hrProcessorLoad[10] = 6 Also, no idea why. -- Mikolaj Golub