Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用snmp获取UCD-snmp-MIB::dskTotalLow值_Snmp - Fatal编程技术网

如何使用snmp获取UCD-snmp-MIB::dskTotalLow值

如何使用snmp获取UCD-snmp-MIB::dskTotalLow值,snmp,Snmp,我的snmp版本是5.7.2,在我将其安装到ubuntu上并尝试获得如下磁盘空间后: cloud@cloud:~/snmp/net-snmp-5.7.2$ snmpwalk -v 2c -c public 10.0.0.125 .1.3.6.1.4.1.2021.9.1.11 UCD-SNMP-MIB::dskTotalLow = No Such Object available on this agent at this OID 当我更改mib时,得到如下正确答案: cloud@cloud:

我的snmp版本是5.7.2,在我将其安装到ubuntu上并尝试获得如下磁盘空间后:

cloud@cloud:~/snmp/net-snmp-5.7.2$ snmpwalk -v 2c -c public 10.0.0.125 .1.3.6.1.4.1.2021.9.1.11
UCD-SNMP-MIB::dskTotalLow = No Such Object available on this agent at this OID
当我更改mib时,得到如下正确答案:

cloud@cloud:~/snmp/net-snmp-5.7.2$ snmpwalk -v 2c -c public 10.0.0.125 .1.3.6.1.4.1.2021.9.1.6
UCD-SNMP-MIB::dskTotal.1 = INTEGER: 14332332
UCD-SNMP-MIB::dskTotal.2 = INTEGER: 0
UCD-SNMP-MIB::dskTotal.3 = INTEGER: 0
UCD-SNMP-MIB::dskTotal.4 = INTEGER: 0
UCD-SNMP-MIB::dskTotal.5 = INTEGER: 0
UCD-SNMP-MIB::dskTotal.6 = INTEGER: 0
UCD-SNMP-MIB::dskTotal.7 = INTEGER: 500708
UCD-SNMP-MIB::dskTotal.8 = INTEGER: 0
UCD-SNMP-MIB::dskTotal.9 = INTEGER: 203908
UCD-SNMP-MIB::dskTotal.10 = INTEGER: 5120
UCD-SNMP-MIB::dskTotal.11 = INTEGER: 509768
UCD-SNMP-MIB::dskTotal.12 = INTEGER: 233191

现在,请给我一些建议,以获取dskTotalLow值,解决大磁盘空间的错误值,非常感谢。

检查您的snmpd.conf设置,了解有关磁盘使用情况监控的信息。下面是“man snmpd.conf”的摘录


我的磁盘snmpd.conf如下:
###磁盘监控###根磁盘上需要10MB,在/var上有5%的空闲,在所有其他磁盘上有10%的空闲磁盘/10000磁盘/var 5%包括所有磁盘10%
如上所述,我认为is已经启用了获取磁盘信息的功能,但无法获取UCD-SNMP-MIB::dskTotalLow的值
  Disk Usage Monitoring
   This requires that the agent was built with support for the ucd-snmp/disk module (which is included as part of the default build con-
   figuration).

   disk PATH [ MINSPACE | MINPERCENT% ]
          monitors the disk mounted at PATH for available disk space.

          The  minimum  threshold  can either be specified in kB (MINSPACE) or as a percentage of the total disk (MINPERCENT% with a ’%’
          character), defaulting to 100kB if neither are specified.  If the free disk space falls below this threshold, then the  corre-
          sponding dskErrorFlag instance will be set to 1, and a suitable description message reported via the dskErrorMsg instance.

          Note:  This situation will not automatically trigger a trap to report the problem - see the DisMan Event MIB section later.

   includeAllDisks MINPERCENT%
          configures  monitoring  of all disks found on the system, using the specified (percentage) threshold.  The threshold for indi-
          vidual disks can be adjusted using suitable disk directives (which can come either before or after the includeAllDisks  direc-
          tive).

          Note:  Whether disk directives appears before or after includeAllDisks may affect the indexing of the dskTable.

          Only one includeAllDisks directive should be specified - any subsequent copies will be ignored.

          The  list  of  mounted disks will be determined when the agent starts using the setmntent(3) and getmntent(3), or fopen(3) and
          getmntent(3),  or setfsent(3)  and  getfsent(3) system calls. If none of the above system calls are available  then  the  root
          partition   "/"  (which   is  assumed to exist on any UNIX based system) will be monitored.  Disks mounted after the agent has
          started will not be monitored.

   If neither any disk directives or includeAllDisks are defined, then walking the dskTable will fail (noSuchObject).