Tripp Lite B0930042E4UV Owners Manual for B093- B097- and B098-Series Console - Page 263

Adding New RPC Devices

Page 263 highlights

15. Advanced Configuration 15.9.3 Adding New RPC Devices There are a number of simple paths to adding support for new RPC devices. The first is to have scripts support the particular RPC included in either the open source PowerMan project (http:// sourceforge.net/projects/powerman) or the open source NUT UPS Tools project. The PowerMan device specifications are rather peculiar, and it is suggested you leave the actual writing of these scripts to the PowerMan authors. However, documentation on how they work can be found at http://linux.die.net/man/5/powerman.dev. The Network UPS Tools (NUT) project has recently moved on from its UPS management origins to also cover SNMP PDUs (and embrace PowerMan). Tripp Lite progressively includes the updated PowerMan and NUT build into the console server firmware releases. The second path is to directly add support for the new RPC devices (or to customize the existing RPC device support) on your console server. The Manage: Power page uses information contained in /etc/powerstrips.xml to configure and control devices attached to a serial port. The configuration also searches for (and loads) /etc/config/powerstrips.xml (if it exists). The user can add their own support for more devices by adding their definitions into /etc/config/powerstrips.xml. This file can be created on a host system and copied to the management console device using scp. Alternately, log in to the management console and use ftp or wget to transfer files. Here is a brief description of the elements of the XML entries in /etc/config/powerstrips.xml: Name or ID of the device support Display Port 1 in menu Display Port 2 in menu ... script to turn power on script to power off script to cycle power script to write power status to /var/run/power-status baud rate character size stop bits parity setting The id appears on the web page in the list of available devices types to configure. The outlets describe targets that the scripts can control. For example, a power control board may control several different outlets. The port-id is the native name for identifying the outlet. This value will be passed to the scripts in the environment variable outlet, allowing the script to address the correct outlet. There are four possible scripts: on, off, cycle and status. When a script is run, its standard input and output is redirected to the appropriate serial port. The script receives the outlet and port in the outlet and port environment variables, respectively. The script can be anything that can be executed within the shell. All of the existing scripts in /etc/powerstrips.xml use the pmchat utility. pmchat works just like the standard UNIX "chat" program, except it ensures interoperation with the port manager. The final options speed, charsize, stop and parity define the recommended or default settings for the attached device. 263

  • 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
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259
  • 260
  • 261
  • 262
  • 263
  • 264
  • 265
  • 266
  • 267
  • 268
  • 269
  • 270
  • 271
  • 272
  • 273
  • 274
  • 275
  • 276
  • 277
  • 278
  • 279
  • 280
  • 281
  • 282
  • 283
  • 284
  • 285
  • 286
  • 287
  • 288

263
15. Advanced Configuration
15.9.3 Adding New RPC Devices
There are a number of simple paths to adding support for new RPC devices.
The first is to have scripts support the particular RPC included in either the open source
PowerMan
project (
http://
sourceforge.net/projects/powerman
) or the open source
NUT UPS Tools
project. The PowerMan device specifications
are rather peculiar, and it is suggested you leave the actual writing of these scripts to the PowerMan authors. However,
documentation on how they work can be found at
. The Network UPS Tools (NUT)
project has recently moved on from its UPS management origins to also cover SNMP PDUs (and embrace PowerMan). Tripp
Lite progressively includes the updated PowerMan and NUT build into the console server firmware releases.
The second path is to directly add support for the new RPC devices (or to customize the existing RPC device support) on
your console server. The
Manage: Power
page uses information contained in
/etc/powerstrips.xml
to configure and control
devices attached to a serial port. The configuration also searches for (and loads)
/etc/config/powerstrips.xml
(if it exists).
The user can add their own support for more devices by adding their definitions into
/etc/config/powerstrips.xml
. This file can
be created on a host system and copied to the management console device using
scp
. Alternately, log in to the management
console and use
ftp
or
wget
to transfer files.
Here is a brief description of the elements of the XML entries in
/etc/config/powerstrips.xml
:
<powerstrip>
<id>Name or ID of the device support</id>
<outlet port=”port-id-1”>Display Port 1 in menu</outlet>
<outlet port=”port-id-2”>Display Port 2 in menu</outlet>
...
<on>script to turn power on</on>
<off>script to power off</off>
<cycle>script to cycle power</cycle>
<status>script to write power status to /var/run/power-status</status>
<speed>baud rate</speed>
<charsize>character size</charsize>
<stop>stop bits</stop>
<parity>parity setting</parity>
</powerstrip>
The
id
appears on the web page in the list of available devices types to configure.
The outlets describe targets that the scripts can control. For example, a power control board may control several different
outlets. The port-id is the native name for identifying the outlet. This value will be passed to the scripts in the environment
variable outlet, allowing the script to address the correct outlet.
There are four possible scripts:
on, off, cycle
and
status
.
When a script is run, its standard input and output is redirected to the appropriate serial port. The script receives the outlet
and port in the
outlet
and
port
environment variables, respectively.
The script can be anything that can be executed within the shell.
All of the existing scripts in
/etc/powerstrips.xml
use the pmchat utility.
pmchat works just like the standard UNIX “chat” program, except it ensures interoperation with the port manager.
The final options
speed, charsize, stop
and
parity
define the recommended or default settings for the attached device.