nut/docs/man/clone.txt

146 lines
4.4 KiB
Text
Raw Permalink Normal View History

2011-01-26 09:35:08 +00:00
CLONE(8)
========
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
NAME
----
2022-06-29 10:37:36 +00:00
2011-01-26 09:35:08 +00:00
clone - UPS driver clone
NOTE
----
2022-06-29 10:37:36 +00:00
2010-03-25 23:20:59 +00:00
This man page only documents the specific features of the
clone driver. For information about the core driver, see
2011-01-26 09:35:08 +00:00
linkman:nutupsdrv[8].
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
DESCRIPTION
-----------
2022-06-29 10:37:36 +00:00
2011-01-26 09:35:08 +00:00
This driver, which sits on top of another driver socket, allows users to group
clients to a particular outlet of a device and deal with this output as if it
was a normal UPS.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
EXTRA ARGUMENTS
---------------
2022-06-29 10:37:36 +00:00
2010-03-25 23:20:59 +00:00
This driver supports the following settings:
2011-01-26 09:35:08 +00:00
*load.off*='command'::
Recommended. Set the command on the "real" UPS driver that will be used to
switch off the outlet. You need both *load.off* and *load.on* in
2010-03-25 23:20:59 +00:00
order to power cycle the outlet. Otherwise, shutting down the clients
2011-01-26 09:35:08 +00:00
powered by an outlet is a one way street (see <<_important,IMPORTANT>>).
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
*load.on*='command'::
Recommended. Set the command on the "real" UPS driver that will be used to
switch on the outlet. You need both *load.off* and *load.on* in
2010-03-25 23:20:59 +00:00
order to power cycle the outlet. Otherwise, shutting down the clients
2011-01-26 09:35:08 +00:00
powered by an outlet is a one way street (see <<_important,IMPORTANT>>).
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
*load.status*='value'::
Recommended. Set the variable on the "real" UPS driver that will be used
to indicate the outlet status (i.e. on/off). If not specified, the clone
2010-03-25 23:20:59 +00:00
driver will attempt to keep track of the outlet status, but this is less
reliable.
2011-01-26 09:35:08 +00:00
*offdelay*='num'::
2010-03-25 23:20:59 +00:00
Set the timer (in seconds) before the outlet is turned off after the
2011-01-26 09:35:08 +00:00
shutdown condition (+OB LB+) for this outlet is met or a command to shutdown
2010-03-25 23:20:59 +00:00
was issued. Defaults to 120 seconds.
2011-01-26 09:35:08 +00:00
*ondelay*='num'::
2010-03-25 23:20:59 +00:00
Set the timer (in seconds) for the outlet to switch on in case the power
2022-06-29 10:37:36 +00:00
returns after the outlet has been switched off. Defaults to 30 seconds.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
*mincharge*='value'::
2010-03-25 23:20:59 +00:00
Set the remaining battery level when the clone UPS switches to LB
(percent).
2011-01-26 09:35:08 +00:00
*minruntime*='value'::
2010-03-25 23:20:59 +00:00
Set the remaining battery runtime when the clone UPS switches to LB
(seconds).
2011-01-26 09:35:08 +00:00
IMPLEMENTATION
--------------
2022-06-29 10:37:36 +00:00
2011-01-26 09:35:08 +00:00
The port specification in the linkman:ups.conf[5] reference the driver
socket that the "real" UPS driver is using. For example:
2022-06-29 10:37:36 +00:00
------
2011-01-26 09:35:08 +00:00
[realups]
driver = usbhid-ups
port = auto
[clone-outlet-1]
driver = clone
port = usbhid-ups-realups
load.on = outlet.1.load.on
load.off = outlet.1.load.off
load.status = outlet.1.status
[...]
2022-06-29 10:37:36 +00:00
------
2011-01-26 09:35:08 +00:00
IMPORTANT
---------
2022-06-29 10:37:36 +00:00
Unlike a real UPS, you should *not* configure a upsmon primary mode for this
driver. When a upsmon primary sees the OB LB flags and tells the upsd server
2010-03-25 23:20:59 +00:00
it is OK to initiate the shutdown sequence, the server will latch the FSD
status and it will not be possible to restart the systems connected without
restarting the upsd server.
This will be a problem if the power returns after the clone UPS initiated
the shutdown sequence on it's outlet, but returns before the real UPS begins
shutting down. The solution is in the clone driver, that will insert the
2022-06-29 10:37:36 +00:00
FSD flag if needed without the help of a upsmon primary.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
CAVEATS
-------
2022-06-29 10:37:36 +00:00
2010-03-25 23:20:59 +00:00
The clone UPS will follow the status on the real UPS driver. You can only
make the clone UPS shutdown earlier than the real UPS driver, not later.
If the real UPS driver initiates a shutdown, the clone UPS driver will
immediately follow.
Be aware that the commands to shutdown/restart an outlet on the real UPS
drivers are not affected, so if you tell the real UPS driver to shutdown
the outlet of the clone UPS driver, your clients will lose power without
warning.
2022-06-29 10:37:36 +00:00
If you use service management frameworks like systemd or SMF to manage the
dependencies between driver instances and other units, then you may have
to set up special dependencies (e.g. with systemd "drop-in" snippet files)
to queue your `clone` drivers to start after the "real" device drivers.
//////////////////////////////////////
TODO later: declare the driver as "optional", see
https://github.com/networkupstools/nut/issues/1389
//////////////////////////////////////
2011-01-26 09:35:08 +00:00
AUTHOR
------
2022-06-29 10:37:36 +00:00
2010-03-25 23:20:59 +00:00
Arjen de Korte <adkorte-guest@alioth.debian.org>
2011-01-26 09:35:08 +00:00
SEE ALSO
--------
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
linkman:upscmd[1],
linkman:upsrw[1],
linkman:ups.conf[5],
linkman:nutupsdrv[8]
2010-03-25 23:20:59 +00:00
2022-06-29 10:37:36 +00:00
Dummy driver:
~~~~~~~~~~~~~
The "repeater" mode of 'dummy-ups' driver is in some ways similar to the
'clone' driver, by relaying information from a locally or remotely running
"real" device driver (and NUT data server).
linkman:dummy-ups[8]
2011-01-26 09:35:08 +00:00
Internet Resources:
~~~~~~~~~~~~~~~~~~~
2022-06-29 10:37:36 +00:00
2010-03-25 23:20:59 +00:00
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/