如何查看net-SNMP库设置的环境变量?

时间:2022-07-28 19:22:29

I am using the net-SNMP library for developing a parser for the MIBs. I want to see the environment variable used bye the library.

我正在使用net-SNMP库为MIBs开发解析器。我希望看到环境变量在库中使用。

I have tried the env command but it doesn't showing any variable as follows

我尝试过env命令,但是它没有显示如下所示的任何变量

MIBDIRS, MIBS etc.

MIBDIRS、mib等等。

Kindly give some idea.

请给出一些想法。

1 个解决方案

#1


2  

MIBDIRS and MIBS environment variables are used to change default values used by net-SNMP for dirctory that contains MIBs and a list of MIBs to load respectively

MIBDIRS和MIBS环境变量用于更改net-SNMP用于dirctory的默认值,该值包含MIBS和要加载的MIBS列表

default are (according to snmpcmd man page):

默认值为(根据snmpcmd手册页):

MIBS = SNMPv2-TC:SNMPv2-MIB:IF-MIB:IP-MIB:TCP-MIB:UDP-MIB:SNMP-VACM-MIB
MIBDIRS = /usr/local/share/snmp/mibs

so until you define these environment variables yourself (and override the defaults this way) you won't see them in env output

因此,在您自己定义这些环境变量(并以这种方式覆盖默认值)之前,您不会在env输出中看到它们

#1


2  

MIBDIRS and MIBS environment variables are used to change default values used by net-SNMP for dirctory that contains MIBs and a list of MIBs to load respectively

MIBDIRS和MIBS环境变量用于更改net-SNMP用于dirctory的默认值,该值包含MIBS和要加载的MIBS列表

default are (according to snmpcmd man page):

默认值为(根据snmpcmd手册页):

MIBS = SNMPv2-TC:SNMPv2-MIB:IF-MIB:IP-MIB:TCP-MIB:UDP-MIB:SNMP-VACM-MIB
MIBDIRS = /usr/local/share/snmp/mibs

so until you define these environment variables yourself (and override the defaults this way) you won't see them in env output

因此,在您自己定义这些环境变量(并以这种方式覆盖默认值)之前,您不会在env输出中看到它们