-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathREADME.px2_configure
117 lines (83 loc) · 3.79 KB
/
README.px2_configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
SYNOPSIS
px2_configure.pl COMMAND [ARGUMENTS]
DESCRIPTION
PX2 deployment and configuration utility.
COMMANDS
configure LIST IPS
Configure some or all devices (network settings, unit name and SNMP
settings).
The behavior of this command is different depending on whether
concrete IP addresses or the 'all' keyword is specified:
* 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.
* 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.
verify LIST IPS
Verify device settings and SNMP access.
identify LIST IPS
Identify some or all devices (show a distinctive string for two
seconds in each unit's display).
reboot LIST IPS
Reboot some or all devices.
fetch_fitness LIST OUTFILE IPS
Fetch fitness data from some or all devices and write them to a file
in CSV format.
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.
print_timezones IP
Print list of supported timezones with its IDs.
set_timezone LIST TZID IPS
Set the timezone of all devices.
ARGUMENTS
LIST
Device list in CSV format.
IPS Device IP addresses; use 'all' to run on all IPs in the CSV file.
IP Device IP address.
OUTFILE
Output file name.
IMAGE
Firmware image file.
TZID
Timezone ID as printed by the "print_timezones" command.
EXAMPLES
px2_configure.pl 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. Configure the
device's network, PDU name and SNMP settings.
px2_configure.pl verify devices.csv all
Verify the network settings, PDU name and SNMP access for all
devices in the list file.
px2_configure.pl 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 five or six fields, seperated by commas:
1. Unit Serial Number
2. PDU Name
3. IP Address
4. Gateway IP Address
5. Netmask
6. Optional comment; the line is ignored if "ignore" is included here
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.
REQUIREMENTS
The following Perl modules are required to run this script:
* Raritan PX2 RPC bindings (distributed along with this script)
* libwww-perl <http://search.cpan.org/dist/libwww-perl/>
* LWP::Protocol::https <http://search.cpan.org/dist/LWP-Protocol-https/>
* JSON <http://search.cpan.org/dist/JSON/>
* JSON-RPC-Common <http://search.cpan.org/dist/JSON-RPC-Common/>
* perl-Error <http://search.cpan.org/dist/Error/>
* Test-Simple <http://search.cpan.org/dist/Test-Simple/>
Additionally, the verify command uses the *snmpget* utility to verify
SNMP access.