.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "px2_configure 1p" .TH px2_configure 1p 2024-04-03 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME px2_configure \- deploy and configure Raritan PX2/PX3 power distribution units .SH SYNOPSIS .IX Header "SYNOPSIS" px2_configure COMMAND [ARGUMENTS] .SH DESCRIPTION .IX Header "DESCRIPTION" PX2 deployment and configuration utility. .SH COMMANDS .IX Header "COMMANDS" .IP "\fBconfigure LIST IPS\fR" 4 .IX Item "configure LIST IPS" Configure some or all devices (network settings, unit name and SNMP settings). .Sp The behavior of this command is different depending on whether concrete IP addresses or the 'all' keyword is specified: .RS 4 .IP \(bu 2 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. It will then change the device's network settings to the values from the device list. The initial IP addresses do not have to match the values from the device list, they might as well be dynamically assigned by a DHCP server. .IP \(bu 2 If the 'all' keyword 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. .RE .RS 4 .RE .IP "\fBverify LIST IPS\fR" 4 .IX Item "verify LIST IPS" Verify device settings and SNMP access. .IP "\fBidentify LIST IPS\fR" 4 .IX Item "identify LIST IPS" Identify some or all devices (show a distinctive string for two seconds in each unit's display). .IP "\fBreboot LIST IPS\fR" 4 .IX Item "reboot LIST IPS" Reboot some or all devices. .IP "\fBfetch_fitness LIST OUTFILE IPS\fR" 4 .IX Item "fetch_fitness LIST OUTFILE IPS" Fetch fitness data from some or all devices and write them to a file in CSV format. .IP "\fBupdate LIST IMAGE IPS\fR" 4 .IX Item "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. .IP "\fBprint_timezones IP\fR" 4 .IX Item "print_timezones IP" Print list of supported timezones with its IDs. .IP "\fBset_timezone LIST TZID IPS\fR" 4 .IX Item "set_timezone LIST TZID IPS" Set the timezone of all devices. .SH ARGUMENTS .IX Header "ARGUMENTS" .IP \fBLIST\fR 4 .IX Item "LIST" Device list in CSV format. .IP \fBIPS\fR 4 .IX Item "IPS" Device IP addresses; use 'all' to run on all IPs in the CSV file. .IP \fBIP\fR 4 .IX Item "IP" Device IP address. .IP \fBOUTFILE\fR 4 .IX Item "OUTFILE" Output file name. .IP \fBIMAGE\fR 4 .IX Item "IMAGE" Firmware image file. .IP \fBTZID\fR 4 .IX Item "TZID" Timezone ID as printed by the "print_timezones" command. .SH EXAMPLES .IX Header "EXAMPLES" .IP "\fBpx2_configure configure devices.csv 192.168.2.3\fR" 4 .IX Item "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 \fIdevices.csv\fR. Configure the device's network, PDU name and SNMP settings. .IP "\fBpx2_configure verify devices.csv all\fR" 4 .IX Item "px2_configure verify devices.csv all" Verify the network settings, PDU name and SNMP access for all devices in the list file. .IP "\fBpx2_configure update devices.csv pdu\-px2\-020106\-26030.bin all\fR" 4 .IX Item "px2_configure update devices.csv pdu-px2-020106-26030.bin all" Update all devices to firmware version 2.1.6. .SH "DEVICE LIST FORMAT" .IX Header "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: .IP "1. Unit serial number (exactly 10 characters)" 4 .IX Item "1. Unit serial number (exactly 10 characters)" .PD 0 .IP "2. PDU name" 4 .IX Item "2. PDU name" .IP "3. IP address with prefix length (e.g. 192.168.99.1/24)" 4 .IX Item "3. IP address with prefix length (e.g. 192.168.99.1/24)" .IP "4. Gateway IP address" 4 .IX Item "4. Gateway IP address" .IP "5. Optional comment; the line is ignored if ""ignore"" is included here" 4 .IX Item "5. Optional comment; the line is ignored if ""ignore"" is included here" .PD .PP Lines with less than four fields are silently ignored. Likewise, lines that do not contain a valid serial number are disregarded. .SH REQUIREMENTS .IX Header "REQUIREMENTS" The following Perl modules are required to run this script: .IP \(bu 2 Raritan PX2 RPC bindings (distributed along with this script) .IP \(bu 2 libwww-perl .IP \(bu 2 LWP::Protocol::https .IP \(bu 2 JSON .IP \(bu 2 JSON-RPC-Common .IP \(bu 2 perl-Error .IP \(bu 2 Test-Simple .PP Additionally, the \fBverify\fR command uses the \fIsnmpget\fR utility to verify SNMP access.