山特UPS电量信息采集环境配置

编程入门 行业动态 更新时间:2024-10-13 12:23:50

山特UPS<a href=https://www.elefans.com/category/jswz/34/1730565.html style=电量信息采集环境配置"/>

山特UPS电量信息采集环境配置

山特UPS电量信息采集环境配置

硬件需求

  • 支持智能卡插口的山特UPS
  • 山特NMC网络管理卡

安装与配置NMC卡

NMC 是一种介于UPS和网络的设备,它可以从UPS获得状态信息并且发出指令。NMC支持两种协议-简易网络管理协议(SNMP)和超文件传输协议(HTTP)以供使用者进入。通过SNMP的网络管理站(NMS)和网页浏览器,用户可以获得UPS的状态信息、发出指令至UPS并且通过网络设定NMC。下图为NMC卡:

安装配置参考官方文档:

NMC卡使用手册

其中,主要是配置好NMC卡的网络(将NMC卡加入到当前局域网)

UPS电量信息采集

NMC支持通过SNMP协议获取UPS状态信息,所以我们通过SNMP协议采集UPS的电量信息。

NMC MIB文件下载地址:.zip,其中RFC1628.MIB为各UPS的通用MIB文件。

根据RFC1628.MIB,查找到电池信息相关的oid如下:

名称oid描述
upsBatteryStatus.1.3.6.1.2.1.33.1.2.1.0The indication of the capacity remaining in the UPS system’s batteries. A value of batteryNormal indicates that the remaining run-time is greater than upsConfigLowBattTime. A value of batteryLow indicates that the remaining battery run-time is less than or equal to upsConfigLowBattTime. A value of batteryDepleted indicates that the UPS will be unable to sustain the present load when and if the utility power is lost (including the possibility that the utility power is mandatoryly absent and the UPS is unable to sustain the output).
upsSecondsOnBattery.1.3.6.1.2.1.33.1.2.2.0If the unit is on battery power, the elapsed time since the UPS last switched to battery power, or the time since the network management subsystem was last restarted, whichever is less. Zero shall be returned if the unit is not on battery power.
upsEstimatedMinutesRemaining.1.3.6.1.2.1.33.1.2.3.0An estimate of the time to battery charge depletion under the present load conditions if the utility power is off and remains off, or if it were to be lost and remain off.
upsEstimatedChargeRemaining.1.3.6.1.2.1.33.1.2.4.0An estimate of the battery charge remaining expressed as a percent of full charge.
upsBatteryVoltage.1.3.6.1.2.1.33.1.2.5.0The magnitude of the present battery voltage.
upsBatterymandatory.1.3.6.1.2.1.33.1.2.6.0The present battery mandatory.
upsBatteryTemperature.1.3.6.1.2.1.33.1.2.7.0The ambient temperature at or near the UPS Battery casing.

通过snmpwalk命令(需要安装net-snmp软件)获取UPS剩余电量信息:

# snmpwalk -v 1 -c private 172.16.51.233 .1.3.6.1.2.1.33.1.2.4.0返回电量为100%:
SNMPv2-SMI::mib-2.33.1.2.4.0 = INTEGER: 100

其它

当前只测试了山特的UPS,其它品牌的UPS的电量信息采集方式应该类似

更多推荐

山特UPS电量信息采集环境配置

本文发布于:2024-02-14 03:17:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1761614.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:电量   信息采集   山特   环境   UPS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!