px2_configure(1p)
π px2_configure β the group chat for your PDU fleet π
okay so. bestie. you have a pile of Raritan PX2/PX3 power distribution units and you're out here configuring them one by one like it's 2009? no. put the browser down. this is px2_configure, from the User Contributed Perl Documentation, manual section 1p, and it is literally going to deploy and configure your whole rack for you. β¨
β¨ SYNOPSIS β¨
px2_configure COMMAND [ARGUMENTS]
π¦ DESCRIPTION π¦
PX2 deployment and configuration utility. that's the whole vibe: you point it at a device list, it goes and does the thing. π«Ά
π COMMANDS π
configure LIST IPS
Configure some or all devices (network settings, unit name and SNMP settings).
the tea here is that this command behaves differently depending on whether you hand it concrete IP addresses or the all keyword, and this is the part everyone gets wrong, so listen up:
- If IP addresses are specified, the program will contact each device, read its serial number and search for a matching entry in the device list. Then it changes the device's network settings to the values from the device list. plot twist: the initial IP addresses do not have to match the values from the device list β they might just as well be dynamically assigned by a DHCP server. it's giving "come as you are, leave as your assigned self." π
- If the
allkeyword is specified, the IP addresses are taken from the device list. The devices' network settings are expected to be properly configured at this point, so the network configuration part will be skipped. up front and honest of it, honestly.
verify LIST IPS
Verify device settings and SNMP access. the vibe check. π₯
identify LIST IPS
Identify some or all devices (show a distinctive string for two seconds in each unit's display). yes it flashes a lil something on the screen so you can find the physical box. iconic.
reboot LIST IPS
Reboot some or all devices. sometimes you just gotta turn it off and on again, no cap. π
fetch_fitness LIST OUTFILE IPS
Fetch fitness data from some or all devices and write them to a file in CSV format. your devices are going to the gym and this collects the receipts. πͺ
update LIST IMAGE IPS
Device firmware update. The firmware image will be sequentially uploaded to each device, then all devices will be instructed to perform the firmware update in parallel. so: uploads one at a time, then everyone jumps at once. coordinated. main character energy. π
ngl, this is a firmware update on real hardware. be sure. be very sure.
print_timezones IP
Print list of supported timezones with its IDs. the ID list you're gonna need for set_timezone. iykyk. π
set_timezone LIST TZID IPS
Set the timezone of all devices.
πΈ ARGUMENTS πΈ
LISTβ Device list in CSV format.IPSβ Device IP addresses; useallto run on all IPs in the CSV file.IPβ Device IP address. (yes, singular. one. just one. π)OUTFILEβ Output file name.IMAGEβ Firmware image file.TZIDβ Timezone ID as printed by theprint_timezonescommand.
π EXAMPLES π
px2_configure configure devices.csv 192.168.2.3
Connect to the device at 192.168.2.3, read its serial number and look it up in the device list file named devices.csv. Then configure the device's network, PDU name and SNMP settings.
px2_configure verify devices.csv all
Verify the network settings, PDU name and SNMP access for all devices in the list file.
px2_configure update devices.csv pdu-px2-020106-26030.bin all
Update all devices to firmware version 2.1.6.
π DEVICE LIST FORMAT π
The device list file contains a list of PX2 devices in CSV format. It could e.g. be exported from an inventory spreadsheet. Each device line contains four or five fields, separated by commas:
- Unit serial number (exactly
10characters) - PDU name
- IP address with prefix length (e.g.
192.168.99.1/24) - Gateway IP address
- Optional comment; the line is ignored if
ignoreis included here
Lines with less than four fields are silently ignored. Likewise, lines that do not contain a valid serial number are disregarded. no drama, no error message, they just don't exist anymore. π
π REQUIREMENTS π
The following Perl modules are required to run this script:
- Raritan PX2 RPC bindings (distributed along with this script)
libwww-perl(https://metacpan.org/release/libwww-perl)LWP::Protocol::https(https://metacpan.org/release/LWP-Protocol-https)JSON(https://metacpan.org/release/JSON)JSON-RPC-Common(https://metacpan.org/release/JSON-RPC-Common)perl-Error(https://metacpan.org/release/Error)Test-Simple(https://metacpan.org/release/Test-Simple)
Additionally, the verify command uses the snmpget utility to verify SNMP access. so go install net-snmp, bestie, don't make verify sad. π₯Ί
β one last thing β
this whole thing is running on perl v5.40.1, dated 2026-08-08, and it says px2_configure(1p) right at the top and bottom of the page like a lil signature. go forth and configure. slay. π
ππ¦
π¦ where this page comes from
- ubuntu stonking: libraritan-rpc-perl 4.3.14+ds-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms