简体   繁体   English

如何在linux的MIB文件中添加变量?

[英]How to add the variables in MIB files in the linux?

Basically, I have added one variable called "sysFirst" (as shown in the below picture)in the available "RFC1213-MIB.txt" file.基本上,我在可用的“RFC1213-MIB.txt”文件中添加了一个名为“sysFirst”的变量(如下图所示)。 After addition of the variable I have validated also using command添加变量后,我也使用命令进行了验证

smilint -l 6 -i namelength-32 ./RFC1213-MIB.txt

So I got the following result所以我得到了以下结果

root@pdu:/usr/share/snmp/mibs# smilint -l 6 -i namelength-32 ./RFC1213-MIB.txt
./RFC1213-MIB.txt:15: warning: redefinition of identifier `SNMPv2-SMI::mib-2'
/usr/share/mibs/ietf/SNMPv2-SMI:13: info: previous definition of `mib-2'
./RFC1213-MIB.txt:19: warning: redefinition of identifier `SNMPv2-TC::DisplayString'
/usr/share/mibs/ietf/SNMPv2-TC:53: info: previous definition of `DisplayString'
./RFC1213-MIB.txt:28: warning: redefinition of identifier `SNMPv2-TC::PhysAddress'
/usr/share/mibs/ietf/SNMPv2-TC:87: info: previous definition of `PhysAddress'
./RFC1213-MIB.txt:56: warning: redefinition of identifier `SNMPv2-SMI::transmission'
/usr/share/mibs/ietf/SNMPv2-SMI:14: info: previous definition of `transmission'
./RFC1213-MIB.txt:268: index element `ifIndex' of row `ifEntry' must have a range restriction
./RFC1213-MIB.txt:616: index element `atIfIndex' of row `atEntry' must have a range restriction
./RFC1213-MIB.txt:1308: index element `ipNetToMediaIfIndex' of row `ipNetToMediaEntry' must have a range restriction
./RFC1213-MIB.txt:19: warning: type `DisplayString' has no format specification
./RFC1213-MIB.txt:28: warning: type `PhysAddress' has no format specification

在此处输入图像描述

Then after restarting the SNMP daemon I observed it not reflecting in the MIB browser as shown in the below image,然后在重新启动 SNMP 守护程序后,我观察到它没有反映在 MIB 浏览器中,如下图所示, 在此处输入图像描述

What will be the reason for not reflecting the variable in the MIB browser? MIB 浏览器中没有反映变量的原因是什么? Any help will be really appreciated.任何帮助将不胜感激。

Whatever MIB files we will make the same we need to add them to the MIB browser by using the load mib browser option normally we can find the same in the file option from the menu bar.无论我们要制作什么MIB文件,我们都需要使用load mib browser选项将它们添加到MIB browser ,通常我们可以在菜单栏中的file选项中找到相同的内容。

After adding the same we can use all the SNMP commands from any device which consists of the MIB Browser.添加相同内容后,我们可以使用来自任何包含 MIB 浏览器的设备的所有SNMP命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM