.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 "2020-09-24" "perl v5.30.3" "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 PX2 .SH "SYNOPSIS" .IX Header "SYNOPSIS" px2_configure \s-1COMMAND\s0 [\s-1ARGUMENTS\s0] .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\s-1PX2\s0 deployment and configuration utility. .SH "COMMANDS" .IX Header "COMMANDS" .IP "\fBconfigure \s-1LIST IPS\s0\fR" 4 .IX Item "configure LIST IPS" Configure some or all devices (network settings, unit name and \s-1SNMP\s0 settings). .Sp The behavior of this command is different depending on whether concrete \s-1IP\s0 addresses or the 'all' keyword is specified: .RS 4 .IP "\(bu" 2 If \s-1IP\s0 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 \s-1IP\s0 addresses do not have to match the values from the device list, they might as well be dynamically assigned by a \s-1DHCP\s0 server. .IP "\(bu" 2 If the 'all' keyword is specified the \s-1IP\s0 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 \s-1LIST IPS\s0\fR" 4 .IX Item "verify LIST IPS" Verify device settings and \s-1SNMP\s0 access. .IP "\fBidentify \s-1LIST IPS\s0\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 \s-1LIST IPS\s0\fR" 4 .IX Item "reboot LIST IPS" Reboot some or all devices. .IP "\fBfetch_fitness \s-1LIST OUTFILE IPS\s0\fR" 4 .IX Item "fetch_fitness LIST OUTFILE IPS" Fetch fitness data from some or all devices and write them to a file in \&\s-1CSV\s0 format. .IP "\fBupdate \s-1LIST IMAGE IPS\s0\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 \s-1IP\s0\fR" 4 .IX Item "print_timezones IP" Print list of supported timezones with its IDs. .IP "\fBset_timezone \s-1LIST TZID IPS\s0\fR" 4 .IX Item "set_timezone LIST TZID IPS" Set the timezone of all devices. .SH "ARGUMENTS" .IX Header "ARGUMENTS" .IP "\fB\s-1LIST\s0\fR" 4 .IX Item "LIST" Device list in \s-1CSV\s0 format. .IP "\fB\s-1IPS\s0\fR" 4 .IX Item "IPS" Device \s-1IP\s0 addresses; use 'all' to run on all IPs in the \s-1CSV\s0 file. .IP "\fB\s-1IP\s0\fR" 4 .IX Item "IP" Device \s-1IP\s0 address. .IP "\fB\s-1OUTFILE\s0\fR" 4 .IX Item "OUTFILE" Output file name. .IP "\fB\s-1IMAGE\s0\fR" 4 .IX Item "IMAGE" Firmware image file. .IP "\fB\s-1TZID\s0\fR" 4 .IX Item "TZID" Timezone \s-1ID\s0 as printed by the \*(L"print_timezones\*(R" 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, \s-1PDU\s0 name and \s-1SNMP\s0 settings. .IP "\fBpx2_configure verify devices.csv all\fR" 4 .IX Item "px2_configure verify devices.csv all" Verify the network settings, \s-1PDU\s0 name and \s-1SNMP\s0 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 \s-1PX2\s0 devices in \s-1CSV\s0 format. It could e.g. be exported from an inventory spreadsheet. Each device line contains five or six fields, separated by commas: .IP "1. Unit Serial Number" 4 .IX Item "1. Unit Serial Number" .PD 0 .IP "2. \s-1PDU\s0 Name" 4 .IX Item "2. PDU Name" .IP "3. \s-1IP\s0 Address" 4 .IX Item "3. IP Address" .IP "4. Gateway \s-1IP\s0 Address" 4 .IX Item "4. Gateway IP Address" .IP "5. Netmask" 4 .IX Item "5. Netmask" .ie n .IP "6. Optional comment; the line is ignored if ""ignore"" is included here" 4 .el .IP "6. Optional comment; the line is ignored if ``ignore'' is included here" 4 .IX Item "6. Optional comment; the line is ignored if ignore is included here" .PD .PP Lines with less than five fields are silently ignored. Likewise, lines that do not contain a valid serial number (i.e. a string starting with 'P') are disregarded. .SH "REQUIREMENTS" .IX Header "REQUIREMENTS" The following Perl modules are required to run this script: .IP "\(bu" 2 Raritan \s-1PX2 RPC\s0 bindings (distributed along with this script) .IP "\(bu" 2 libwww-perl .IP "\(bu" 2 LWP::Protocol::https .IP "\(bu" 2 \&\s-1JSON\s0 .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 \&\s-1SNMP\s0 access.