2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-05 04:27:55 +00:00
Commit Graph

14 Commits

Author SHA1 Message Date
Kilian Cavalotti 30dc723b6d Fix genpdu sensor value column and connection detection
genpdu read negative-capable sensors from the unsigned value column,
which the MIB leaves undefined for them: a PX4 answers it with 0 for
inlet reactive power and carries the reading in the signed column. Use
SensorSignedMinimum to pick the column, as the MIB specifies. The
unsigned column is still needed for active energy, whose range exceeds
Integer32 and reads 0 in the signed one.

An unreachable PDU or a wrong credential looked like a PDU without
switched outlets, since the switching probe was the first exchange with
the device. Probe pduCount first (implemented by every PDU2 agent,
verified on PX2, PX3 and PX4) and return no session when it fails, so
callers print "Couldn't connect to <pdu>". Warn when pduCount is not 1
rather than refusing: a linked primary still answers for its own
outlets.

Add unit tests for the genpdu sensor, session and inventory paths.

Signed-off-by: Kilian Cavalotti <kilian@stanford.edu>
2026-08-24 16:32:41 -07:00
Kilian Cavalotti 657b17570a Add genpdu pdutype for generic SNMP PDUs (PDU2-MIB)
Add a new pdutype (genpdu) for PDUs implementing the Raritan PDU2-MIB.
A single MIB covers the Raritan PX2/PX3/PX4/PXC/SRC/PXO/BCM series, the
Server Technology PRO3X/PRO4X series, the Legrand intelligent PDUs, and
all PDUs following the PDU2-MIB.

Supports rpower (whole-PDU and per-outlet), rinv and rvitals over SNMP
v1, v2c or v3, with credentials read from the pdu table).

Unlike the existing types, sensor units and decimal precision are read
from the MIB per sensor rather than hardcoded, so readings are correct
across models that report differing precision for the same sensor.
Outlet switching capability is probed at connect time, so metered-only
models report a single "unsupported" message instead of a per-outlet error.

rspconfig is not supported for genpdu; PDU linking and BCM2/PMC power
meters are out of scope.

Tested on Raritan PX4-5851-E7V2 (fw 4.2.10.5-50400, switched),
PX3-1901U-N1 and PX3-1901U-N1A6 (fw 4.0.20.5-49038, metered), and
PX2-1901U-N1A6 (fw 4.0.20.5-49038, metered).

Signed-off-by: Kilian Cavalotti <kilian@stanford.edu>
2026-08-20 18:51:02 -07:00
besawn 77cf333172 Spelling fixes in advanced/pdu docs 2022-02-10 08:28:31 -05:00
GONG Jie ba06eb05e7 Remove trailing spaces in file docs/source/advanced/pdu/pdu.rst 2017-12-31 23:59:59 +00:00
GONG Jie 692adf7ac6 Remove trailing spaces in file docs/source/advanced/pdu/irpdu.rst 2017-12-31 23:59:59 +00:00
GONG Jie a037de1d0a Remove trailing spaces in file docs/source/advanced/pdu/index.rst 2017-12-31 23:59:59 +00:00
GONG Jie e81bf828c0 Remove trailing spaces in file docs/source/advanced/pdu/crpdu.rst 2017-12-31 23:59:59 +00:00
Casandra Qiu 2acd4365f0 Support hostname and network setting changes for IRPDU 2018-01-25 13:34:37 -05:00
Casandra Qiu 1f06984868 types of PDUs 2018-01-17 21:06:48 -05:00
Casandra Qiu ec7a7fc325 modify changes from Mark's review 2018-01-16 13:46:43 -05:00
Casandra Qiu daae8eed58 Add documentation for PDU support. 2018-01-15 15:28:57 -05:00
Casandra Qiu 4776e2c7f5 change output string from "on" to "reset" 2017-03-27 21:59:59 -04:00
Casandra Qiu 865527400f ADD support for power reset of PDU outlet 2017-03-21 12:01:42 -04:00
Casandra Qiu a613bd2ac8 Add PDU documentation 2017-02-14 14:08:09 -05:00