“此 MIB 视图中不再有变量”是什么意思 (Linux)?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14690216/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What does "No more variables left in this MIB View" mean (Linux)?
提问by Alex
On Ubuntu 12.04 I am tring to get the subtree of management values with the following command:
在 Ubuntu 12.04 上,我尝试使用以下命令获取管理值的子树:
snmpwalk -v 2c -c public localhost
with the last line of the output being
输出的最后一行是
iso.3.6.1.2.1.25.1.7.0 = No more variables left in this MIB View (It is past the end of the MIB tree)
Is this an error? A warning? Does the subtree end there?
这是一个错误吗?一个警告?子树是否到此为止?
采纳答案by Douglas Manley
There's a bit more going on here than you might suspect. I encounter this on every new Ubuntu box that I build, and I do consider it a problem (not an error, but a problem--more on this down further).
这里发生的事情比你想象的要多。我在我构建的每个新的 Ubuntu 机器上都会遇到这个问题,我确实认为这是一个问题(不是错误,而是一个问题——更多关于这个问题)。
Here's the technically-correct explanation (why this is not an "error"):
这是技术上正确的解释(为什么这不是“错误”):
"No more variables left in this MIB View" is not particularly an error; rather, it is a statement about your request. The request started at something simple, say ".1.3" and continued to ask for the "next" lexicographic OID. It got "next" OIDs until that last one, at which point the agent has informed you that there's nothing more to see; don't bother asking.
“在这个 MIB 视图中没有更多的变量”并不是一个特别的错误;相反,它是关于您的请求的声明。请求从一些简单的东西开始,比如“.1.3”,然后继续请求“下一个”词典 OID。它有“下一个”OID,直到最后一个,此时代理通知你没有什么可看的了;不要打扰问。
Now, here's why I consider it a problem (in the context of this question):
现在,这就是为什么我认为这是一个问题(在这个问题的上下文中):
The point of installing "snmpd" and running it is to gather meaningful information about the box; typically, this information is performance-oriented. For example, the three general things that I need to know about are network-interface information (IF-MIB::ifHCInOctets and IF-MIB::ifHCOutOctets), disk information (UCD-SNMP-MIB::dskUsed and UCD-SNMP-MIB::dskTotal), and CPU information (UCD-SNMP-MIB::ssCpuRawIdle, UCD-SNMP-MIB::ssCpuRawWait, and so on).
安装“snmpd”并运行它的目的是收集有关盒子的有意义的信息;通常,此信息是面向性能的。例如,我需要了解的三件事是网络接口信息(IF-MIB::ifHCInOctets 和 IF-MIB::ifHCOutOctets)、磁盘信息(UCD-SNMP-MIB::dskUsed 和 UCD-SNMP- MIB::dskTotal) 和 CPU 信息(UCD-SNMP-MIB::ssCpuRawIdle、UCD-SNMP-MIB::ssCpuRawWait 等)。
The default Ubuntu "snmpd" configuration specifically denies just about everything useful with this configuration (limiting access to just enough information to tell you that the box is a Linux box):
默认的 Ubuntu "snmpd" 配置明确拒绝了此配置的所有有用内容(限制访问仅足以告诉您该框是 Linux 框的信息):
view systemonly included .1.3.6.1.2.1.1
view systemonly included .1.3.6.1.2.1.25.1
rocommunity public default -V systemonly
This configuration locks the box down, which may be "safe" if it will be on an insecure network with little SNMP administration knowledge available.
此配置将盒子锁定,如果它位于一个不安全的网络上,几乎没有可用的 SNMP 管理知识,这可能是“安全的”。
However, the first thing that I do is remove the "-V systemonly" portion of the "rocommunity" setting; this will allow all available SNMP information to be accessed (read-only) via the community string of "public".
但是,我要做的第一件事是删除“rocommunity”设置的“-V systemonly”部分;这将允许通过“public”社区字符串访问(只读)所有可用的 SNMP 信息。
If you do that, then you'll probably see what you're expecting, which is pages and pages of SNMP information that you can use to gauge the performance of your box.
如果你这样做了,那么你可能会看到你所期待的,这是一页又一页的 SNMP 信息,你可以用它来衡量你的机器的性能。
回答by Albert Chen
Briefly, this is not an error, actually, when you "walk up" all OIDs on your agent, it will shows your this line> Sometimes, it won't show you this line, because the last OID is not on your agent(you have already walk up all OIDs on your agent, but not walk up all OIDs).
简而言之,这不是错误,实际上,当您“走上”代理上的所有 OID 时,它会显示您的这一行> 有时,它不会向您显示这一行,因为最后一个 OID 不在您的代理上(您已经遍历了代理上的所有 OID,但尚未遍历所有 OID)。
回答by itirazimvar
$ snmpwalk -v 2c -c public localhost NET-SNMP-EXTEND-MIB::nsExtendObjects
NET-SNMP-EXTEND-MIB::nsExtendObjects = No more variables left in this MIB View (It is past the end of the MIB tree)
Also you can get this error while you can trying to see executed scripts I fix that problem to add
您也可以在尝试查看已执行的脚本时收到此错误我修复了该问题以添加
view all included .1 80
line to snmpd.conf
than restart service
线到snmpd.conf
比重新启动服务
Than you will see your output going to change for both input
比您会看到您的输出将更改为两个输入