<?xml version='1.0' encoding='UTF-8' ?>
<!-- The SGML source file draft-rprice-ups-management-protocol-08.sgml2rfc
     makes extensive use of markup minimisation.  The required
     XML is generated from the SGML by osgmlnorm:I: "OpenSP" version "1.5.2"
     using a HyTime architectural form, and is verified to
     conform by xml2rfc 3.12.2
     Editor: Roger Price, NUT Project, ietf@rogerprice.org
     2022-03-30 15:13:59 UTC
-->
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<rfc xml:lang="en" xmlns:xi="http://www.w3.org/2001/XInclude" obsoletes="" updates="" category="info" ipr="trust200902" submissionType="IETF" docName="draft-rprice-ups-management-protocol-08" sortRefs="true" symRefs="true" tocInclude="true" tocDepth="4" version="3">
<front>
<title abbrev="UPS management protocol">Uninterruptible Power Supply (UPS) Management Protocol
                                         -- Commands and Responses</title>
<seriesInfo name="Internet-Draft" value="draft-rprice-ups-management-protocol-08"/>
<author initials="R." surname="Price" fullname="Roger Price" role="editor">
<organization>Network UPS Tools Project
  </organization>
<address>
<postal>
<street>
  </street>
<city>
  </city>
<region>
  </region>
<code>
  </code>
<country>France
  </country>
</postal>
<phone>
  </phone>
<email>ietf@rogerprice.org
  </email>
</address>
</author>
<date year="2022">
</date>
<area>General
</area>
<workgroup>IETF
</workgroup>
<keyword>Uninterruptible Power Supply UPS NUT
</keyword>
<abstract>
<t>This document describes the command/response protocol currently
used in the management of Uninterruptible Power Supply (UPS) units and
other power devices often deployed in small offices, and in IT
installations subject to an erratic public power supply.  The UPS units typically
interface to an Attachment Daemon in the system they protect.  This
Daemon is in turn polled by a Management Daemon which notifies users
and system administrators of power supply incidents, and automates
system shutdown decisions.  The commands and responses described by
this document are exchanged between the UPS Attachment Daemon and the
Management Daemon.  Current practice when this text was written risks
weak security and this is addressed in the Security Considerations
sections of this document.
</t>
</abstract>
</front>
<middle>
<section>
<name>Introduction</name>
<section anchor="intro">
<name>Current Practice</name>
<t>This document describes UPS management techniques and current UPS
management practice published by the NUT Project.  The document is
based on version 2.8.0 of the NUT Project software which supports
version 1.3 of the NUT protocol.
</t>
<t>Since May 2002, the protocol described by this document has been
operating on IANA port nut/3493 running over TCP.
</t>
<section anchor="proj">
<name>NUT Software Project</name>
<t>The primary goal of the NUT (Network UPS Tools) Software
Project <xref target="NUT"></xref> is to provide support for Power
Devices, such as Uninterruptible Power Supplies.  The Project has been
in operation since 1998 with a major rework in 2003.  It operates
through a user <xref target="nut-upsuser">mailing list</xref>, a
developer <xref target="nut-upsdev">mailing list</xref>,
a <xref target="NUT">web site</xref> and
a <xref target="nut-repository">GitHub repository</xref>.  See
<xref target="githist"></xref> and <xref target="History"></xref> for
a history of the project.
</t>
</section>
<section anchor="TSS">
<name>The "Shutdown Story"</name>
<t>Appendix "The Shutdown Story" describes the current UPS management
practice for performing a managed shutdown of unattended
infrastructure after an unscheduled failure of the public power supply in order to
minimise the risk of corruption to data processed by this
infrastructure.  See <xref target="shutdownstory"></xref>.
</t>
</section>
<section anchor="HowtoRead">
<name>How to Read this Document</name>
<t>To lighten the text, the term "UPS" is used when "Managed Power
Device" would be more complete.  The reader should understand the
simple "UPS" to include other managed power devices.
</t>
<t>The statuses and events appearing in this document are named with
short text-form names, some of which are abbreviations.  A full list
of the statuses can be found in <xref target="symbols"></xref> while
the events are listed in
<xref target="events"></xref>.
</t>
<t>This document refers to the "public power supply".  Other texts
frequently refer to "utility power", "input source power" or even
"wall power".
</t>
</section>
</section>
<section>
<name>Requirements Language</name>
<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP
14 <xref target="RFC2119"></xref> <xref target="RFC8174"></xref>
when, and only when, they appear in all capitals, as shown here.
</t>
</section>
<section anchor="AddInf">
<name>Additional Information</name>
<t>Additional information about the NUT Project is available in
the <xref target="Documentation">project documentation</xref>.
Requests for further information about this protocol and related
technical matters may be addressed to
the <xref target="nut-upsuser">mailing list</xref> of the NUT Project.
</t>
</section>
</section>
<section anchor="Terminology">
<name>Terminology</name>
<t>The following technical terms appear in this document. They are
listed in alphabetical order.
</t>
<section anchor="AD">
<name>Attachment Daemon</name>
<t>The Attachment Daemon retrieves status from the UPS and sends
commands to it often through a Driver specific to the hardware model
and the connection medium, e.g., USB, serial.  See <xref target="Driver"></xref>. It
maintains an abstracted view of the hardware through the use of
hardware statuses.  See <xref target="st"></xref>.  A Management Daemon may
consult the abstracted view using the commands described in this
document.
</t>
<t>See <xref target="MinSup"></xref> for details of the recommended
minimum support of variables which calls for Attachment Daemon support
of statuses <tt>OB</tt>, <tt>OL</tt>, <tt>LB</tt> and <tt>FSD</tt>.
</t>
<t>The NUT Project implemented an Attachment Daemon as program <tt>upsd</tt> and a
set of hardware specific drivers, all written in K&amp;R C.  The Attachment Daemon
is launched as system user "root", but for better security, then drops
privilege to run as a detached software service.
</t>
</section>
<section anchor="au">
<name>Administrative User</name>
<t>In current practice, the commands and other functions offered by
the Attachment Daemon to each Management Daemon are made available to a set of Management Daemon users
which authenticate to the Attachment Daemon with basic credentials (username and
password).  These users are not system users, they are specific to an
Attachment Daemon and are listed in a text file (currently <tt>upsd.users</tt>)
which is read by the Attachment Daemon and which assigns to each of them the
password, Instant Commands and actions which are allowed, together
with the Primary or Secondary status of the Management Daemon.  For details,
see <xref target="adminuser"></xref>. For details of Primary see
<xref target="prim"></xref>, and for details of Secondary see <xref target="sec"></xref>.  Typically a high-level
user will be able to send command <tt>FSD</tt> but a low-level user
might only be allowed to access the test panel.  The security
provisions for administrative users are discussed in
<xref target="adsec"></xref>.
</t>
</section>
<section anchor="Driver">
<name>Driver</name>
<t>A Driver is that part of an Attachment Daemon which is specific to
the UPS hardware, the connection medium and the connection protocol,
e.g., USB, serial.  In current practice the Attachment Daemon has a
driver for each hardware interface type it supports.  Although this
document considers the driver to be part of the Attachment Daemon,
current practice is to see it as a separate software unit running as a
Daemon "in front of" the Attachment Daemon.  The protocol for data
exchange between the Driver and the Attachment Daemon is outside the
scope of this document.
</t>
</section>
<section>
<name>Event</name>
<t>A UPS Event occurs in the Management Daemon when a change in UPS status is
received from the Attachment Daemon.  This event is internal to the Management Daemon.
See <xref target="events"></xref>.
</t>
</section>
<section anchor="IC">
<name>Instant Command</name>
<t>A command which when sent to the Attachment Daemon is passed to the driver and
sent to the hardware without any configured delay to perform a
function. For example <tt>INSTCMD su700 test.panel.start</tt>&nbsp;.
See <xref target="instcmd"></xref>.
</t>
</section>
<section anchor="MD">
<name>Management Daemon</name>
<t>The Management Daemon is primarily responsible for managing the
hardware and orchestrating system-wide actions after a power event.
Using commands sent to the Attachment Daemon it follows the status of the UPS and
determines when UPS events occur.  It takes decisions based on the
events, such as calling for a system shutdown.  See
<xref target="shutdownstory"></xref>. Although the term includes the
word "Daemon" nothing requires that it be implemented as a detached
software service.  The Management Daemon may also provide
administrative functions such as a graphic interface to view the
hardware activity.
</t>
<t>There are several examples of a Management Daemon: the NUT Project
provides <tt>upsmon</tt> which takes the system shutdown decision when
the public power supply fails.  Further configuration options such as timers were
provided by helper program <tt>upssched</tt>.
</t>
<t anchor="util">Other programs represent the Management Daemon:
</t>
<ul spacing="compact">
<li><tt>upsc</tt> reports the values of the variables defined for a
given UPS, see <xref target="typvar"></xref>.
</li>
<li><tt>upsrw</tt> reports on and changes the values of the readable
and writable configuration variables defined for a given UPS,
see <xref target="rw"></xref>.
</li>
<li><tt>upscmd</tt> reports on and executes the instant action
commands defined for a given UPS, see <xref target="instcmd"></xref>.
</li>
<li><tt>UPSmon.py</tt> is an experimental Python3 rewrite
of <tt>upsmon</tt> and <tt>upssched</tt> which includes support
for <xref target="RFC8446">TLS 1.3</xref>.
</li>
</ul>
</section>
<section anchor="prim">
<name>Primary</name>
<t>When a power device such as a UPS unit supplies power to more than
one system, the computer running the driver is known as the Primary.
The others are Secondaries.  See figure <xref target="fig.oview4" format="counter"></xref>.  Common current practice for system administrators is
to consider the Management Daemon in the Primary to be the Primary Management
Daemon which is in charge of the shutdown of all the systems powered
by the UPS.  The Primary Management Daemon sets status
symbol <tt>FSD</tt> to order the secondaries to shut down.
</t>
<t>Note: Historically, the Primary was known as the "Master".
</t>
</section>
<section anchor="sec">
<name>Secondary</name>
<t>When a hardware device such as a UPS unit supplies power to more
than one system, the system which communicates directly with the UPS
unit e.g. using a USB, RS232, or network connection, is known as the
Primariy.  The other are Secondaries.  There is no Attachment Daemon in a
Secondary. See figure <xref target="fig.oview4" format="counter"></xref>.
Common current practice for system administrators is to consider the
Management Daemon in a Secondary to be a Secondary Management Daemon which
understands status symbol <tt>FSD</tt> as an order to shut down.
</t>
<t>Note: Historically, the Secondary was known as the "Slave".
</t>
</section>
<section anchor="sess">
<name>Session</name>
<t>The Management Daemon may initiate a TCP session with a specified device such
as a UPS known to the Attachment Daemon. The session structure provides for audit
and security as well as access to mission critical UPS functions.  For
example good practice requires a password protection for an Instant
Command which turns off a UPS outlet.  Other than the commands and
responses used, the details of session management are outside the
scope of this document.
</t>
</section>
<section anchor="st">
<name>UPS Status</name>
<t>The status of a hardware device such as a UPS unit is a symbolic
description of the state of the unit.  It consists of a space
separated list of symbols from the set {<tt>ALARM</tt> <tt>BOOST</tt> <tt>BYPASS</tt>
<tt>CAL</tt> <tt>CHRG</tt> <tt>COMM</tt> <tt>DISCHRG</tt> <tt>FSD</tt> <tt>LB</tt> <tt>NOCOMM</tt> <tt>OB</tt>
<tt>OFF</tt> <tt>OL</tt> <tt>OVER</tt> <tt>RB</tt> <tt>TEST</tt> <tt>TRIM</tt>}.  The symbols <tt>TICK</tt> and
<tt>TOCK</tt> are experimental additions to the statuses and are not in
common current practice.  See <xref target="symbols"></xref> which
specifies each of these symbols.
</t>
<t>See <xref target="MinSup"></xref> for details of the recommended
minimum support of status symbols <tt>OB</tt>, <tt>OL</tt>, <tt>LB</tt>
and <tt>FSD</tt>.
</t>
</section>
<section anchor="var">
<name>UPS Variable</name>
<t>The metrics and identifiers provided by each UPS are represented by
variables giving the value representing that metric or identifier, The
UPS variable is an abstraction of the UPS hardware configuration and
activity maintained by the Attachment Daemon.  See <xref target="Annex1"></xref>
which provides examples of variables.  For example the
variable <tt>battery.charge</tt> contains the current charge of the
UPS battery as a percentage value.
</t>
<t>Note: Some variables are constants, e.g.  battery type,
manufacturer.
</t>
<t>See <xref target="MinSup"></xref> for details of the
recommended minimum support of variables.  A full list of possible
variables is available in <xref target="gitvars">source code file
docs/nut-names.txt</xref> which serves as the Recording Document.
</t>
</section>
</section>
<section anchor="overview">
<name>Protocol Overview</name>
<t>Figure <xref target="fig.oview" format="counter"></xref> shows a reference
configuration in which the command/response protocol applies.  The UPS
shown is representative of all managed power devices,
</t>
<figure anchor="fig.oview">
<name>Reference Configuration
</name>
<artwork align="center">                                            "The client"
	   ,--------------,               ,--------------,
 ,-----,   |     UPS      | &lt;-Commands    |     UPS      |
 | UPS |---|  Attachment  |---------------|  Management  |
 |     |===|    Daemon    |   Responses-&gt; |    Daemon    |
 /-----\   '--------------'               '--------------'
            UPS Attachment                 UPS Management
                System        Network          System</artwork>
</figure>
<t>The reference configuration in figure <xref target="fig.oview" format="counter"></xref> shows a single UPS unit which has a power supply link
(<tt>===</tt>) and a data link (<tt>---</tt>) attached to a system
running an Attachment Daemon.  The UPS provides power supply protection to the
system running the Attachment Daemon.
</t>
<t>In practice there may be more than one UPS unit, and a unit may
provide power protection to more than one system.  The figure also
shows a single Management Daemon.  In practice there may be more than one
Management Daemon, and any one Management Daemon may manage more than
one UPS Attachment Daemon.
</t>
<t>The protocol applies to connections between the Attachment Daemon
and the Management Daemon which act as <strong>server</strong>
and <strong>client</strong> respectively.  The Management Daemon sends
commands over TCP to the Attachment Daemon and receives responses over
TCP from that Daemon.
</t>
<t>The two Daemons may run in the same system, or may be connected
through a local or wide area network.  In simple cases, as shown in
figure <xref target="fig.oview2" format="counter"></xref>, the Attachment Daemon
and the Management Daemon are in the same system, the one protected by the UPS.
The commands and responses are exchanged through an internal loopback
interface.
</t>
<figure anchor="fig.oview2">
<name>Simplified single-system configuration
</name>
<artwork align="center">                                         "The client"
	   ,--------------------,---------------------,
 ,-----,   |     UPS       &lt;-Commands        UPS      |
 | UPS |---|  Attachment        |         Management  |
 |     |===|    Daemon       Responses-&gt;    Daemon    |
 /-----\   '--------------------'---------------------'
                             Internal
                             loopback
             UPS Attachment and Management System</artwork>
</figure>
<t>The reference configuration does not require any specific
design. For example figure <xref target="fig.oview3" format="counter"></xref>
shows an arrangement in which the Attachment Daemon is closely associated with, or
even included in the UPS system setup.  This is becoming more
prevalent with the availability of low cost processors able to run the
Attachment Daemon thereby effectively creating a network attached UPS running a
published protocol.
</t>
<figure anchor="fig.oview3">
<name>UPS and Attachment Daemon integration
</name>
<artwork align="center">                                      "The client"
 ,-----,------------,               ,--------------,
 |     |    UPS     | &lt;-Commands    |     UPS      |
 | UPS - Attachment |---------------|  Management  |
 |     |   Daemon   |   Responses-&gt; |    Daemon    |
 /-----'------------\               '--------------'
    UPS Attachment                   UPS Management
        System           Network          System</artwork>
</figure>
<t>As the power requirements for processors decrease, it is becoming
increasingly common to use a single UPS to protect multiple systems as
shown in figure <xref target="fig.oview4" format="counter"></xref>.  However
there is only one data line (<tt>---</tt>) from the UPS to the Primary
system.  The others have only power connections (<tt>===</tt>) to the
UPS, and are known as Secondaries.  A Secondary does not run an Attachment Daemon,
it connects over a network to the Attachment Daemon in the
Primary. Figure <xref target="fig.oview4" format="counter"></xref> shows the
Attachment Daemon and the Primary Management Daemon in the same system.  This is common
practice but it is not a technical requirement.
</t>
<figure anchor="fig.oview4">
<name>UPS protects multiple systems
</name>
<artwork align="center">                                      "The client"
	   ,--------------------,---------------------,
 ,-----,   |     UPS       &lt;-Commands      Primary    |
 |     |---|  Attachment        |         Management  |   Primary
 |     |===|    Daemon       Responses-&gt;    Daemon    |
 |     |   '--------------------'---------------------'
 | UPS |            ^
 |     |            '&lt;-Commands---Responses-&gt;,
 |     |   	                             v
 |     |            ,--------------,-----------------,
 |     |============|              |     Secondary   |
 /-----\            |              |     Management  |   Secondary
                    |              |       Daemon    |
                    '--------------'-----------------'</artwork>
</figure>
<aside>
<t>Note: Should the Primary fail or go off-line, the fate of
the Secondaries depends on the UPS status when the Primary failed.  If
the UPS had status <tt>OL</tt> the Secondary continues operation, but if the
UPS had status <tt>OB</tt> the Secondary may choose to shut down as a precaution.
</t>
</aside>
</section>
<section anchor="protspec">
<name>Protocol Specification</name>
<t>This specification includes only the commands and their responses.
An implementation of the Attachment Daemon has an internal state machine, and some
complex implementations of the Management Daemon include an internal state
machine; for example to assist the system shutdown of a complex
installation.  The Management Daemon is required to remember the
previous <tt>ups.status</tt> value it received from the Attachment Daemon and
compare it with the next.  Other than that the management protocol
used between them is effectively stateless.
</t>
<t>See for example <xref target="events"></xref> which shows a map of the
new <tt>ups.status</tt> response and the previous <tt>ups.status</tt>
response to an Event which is taken as the basis for Management Daemon action.
</t>
<section anchor="Notation">
<name>Notation Used in this Specification</name>
<t>The character set used for commands and responses is UTF-8 but
current practice is to limit the character set used to the single byte
UTF-8 characters 0-127.
</t>
<aside>
<t>Historical note: UTF-8 characters 0-127 were originally
known as the American Standard Code for Information Interchange,
US-ASCII, first published in 1963.</t>
</aside>
<t>Multi-word elements are contained within U+0022 QUOTATION MARK
characters for easier parsing. E.g., "UPS on fire". Embedded quotation
marks are escaped with U+005C REVERSE SOLIDUS \ often known as
backslashes. Embedded backslashes are also escaped by representing
them as \\.
</t>
<t anchor="onenewline">Commands and responses have no leading or
trailing whitespace, and are terminated with a single new
line character U+000A LINE FEED (LF).
</t>
<t>White space within commands and responses is reduced to one U+0020
SPACE (SP).
</t>
</section>
<section anchor="commands">
<name>Commands</name>
<t>The commands address the UPS to which they apply
by <tt>&lt;upsname&gt;</tt> where</t>
<ul spacing="compact">
<li><tt>&lt;upsname&gt;</tt>
::= <tt>&lt;ups&gt;[@&lt;hostname&gt;[:&lt;port&gt;]]</tt>
</li>
<li><tt>&lt;ups&gt;</tt> is defined by the Attachment Daemon configuration files.
</li>
<li>The default <tt>&lt;hostname&gt;</tt> is <tt>localhost</tt>
</li>
<li>The <tt>&lt;port&gt;</tt> is the number of the TCP port on which
the Attachment Daemon is listening.  The default is 3493.  This is supported by
all current Management Daemons.
</li>
</ul>
<t>Examples: <tt>myups</tt>, <tt>UPS-97B@bigserver.example.com</tt>
</t>
<t>Note: Experimental Management Daemons use an extended form
of <tt>&lt;upsname&gt;</tt> in configuration files and in program
parameters, where
</t>
<ul spacing="compact">
<li><tt>&lt;upsname&gt;</tt> ::= <tt>[&lt;group&gt;:]&lt;ups&gt;[@&lt;hostname&gt;[:&lt;port&gt;]]</tt>
</li>
<li><tt>&lt;group&gt;</tt> is an experimental extension to provide for groups of UPSs.  It is not in common current practice.
</li>
<li><tt>&lt;ups&gt;</tt> is defined by the Attachment Daemon configuration files.
</li>
<li>The default <tt>&lt;hostname&gt;</tt> is <tt>localhost</tt>
</li>
</ul>
<t>Examples: <tt>ups-1@example.com:3493</tt>, <tt>HB:heartbeat1@example.com:3493</tt>
</t>
<t>In the current implementation, the names of commands and
subcommands are not case sensitive. For example <tt>GET VAR</tt> may
be written as <tt>Get var</tt>, but in this specification they are
always written in upper case.  Similarly, <tt>&lt;upsname&gt;</tt>
and <tt>&lt;varname&gt;</tt> are not case sensitive.  For
example <tt>UPS341 ups.id</tt> may be written as <tt>ups341
Ups.Id</tt>, but in this specification <tt>&lt;varname&gt;</tt> is
always written in lower case.
</t>
<section anchor="attach">
<name><tt>ATTACH</tt></name>
<t>In a configuration such as that shown
in <xref target="fig.oview4"></xref> in which a UPS protects more than
one system, the Primary Management Daemon needs to know how many Secondaries are
currently "<em>active</em>", i.e., powered by the UPS, either from the
public power supply or from battery power.  The Attachment Daemon supports this by keeping a
count of all the "<em>active</em>" systems powered by a UPS.  The
count is initialised, one Secondary at a time by the <tt>ATTACH</tt>
command, which should be understood as "<em>count this Secondary as
active</em>".  <tt>ATTACH</tt> is one of three commands for Secondary
counting: command <tt>DETACH</tt> decrements the count and a Management Daemon may
read the count at any time using command <tt>NUMATTACH</tt>.
</t>
<t>The <tt>ATTACH</tt> command is also sent to the Attachment Daemon for the
Primary so during normal, fully protected operation, the count is 1
for the Primary + the number of secondaries.  During a full system
shutdown, the count drops as each Secondary Management Daemon executes command
<tt>DETACH</tt> during its own shutdown.  When the count drops to 1, only
the Primary is "<em>active</em>" and it knows that all the secondaries
have shut down.
</t>
<t>Command: <tt>ATTACH &lt;upsname&gt;</tt>
</t>
<t>If the command succeeds, the response is <tt>OK</tt>, otherwise
see the error responses in <xref target="errorresponses"></xref>.
</t>
<t>Note: Historically, this command was known as <tt>LOGIN</tt>.
Since that <tt>LOGIN</tt> was not the conventional user access to a
shell or program the name was changed to avoid confusion.
</t>
</section>
<section anchor="detach">
<name><tt>DETACH</tt></name>
<t>This companion command to <tt>ATTACH</tt> reduces the count of
"active" Secondaries.  It should be understood as "<em>this Secondary
is no longer active</em>", and is usually used during system shutdown
to decrement a count of how many Secondaries are still "active".
</t>
<t>Command: <tt>DETACH</tt>
</t>
<t>If the command succeeds, the response is <tt>OK Goodbye</tt>,
otherwise see the error responses
in <xref target="errorresponses"></xref>.
</t>
<t>Note: Historically, this command was known as <tt>LOGOUT</tt>.
</t>
</section>
<section anchor="FSD">
<name><tt>FSD</tt></name>
<t>A Management Daemon which is Primary and has the required authority, uses this
command to set status symbol <tt>FSD</tt> meaning "Forced Shutdown" in
the Attachment Daemon.  In current practice the Primary Management Daemon uses the symbol to
tell the Secondaries to shut down.
</t>
<t>Command: <tt>FSD &lt;upsname&gt;</tt>
</t>
<t>If the command succeeds, the response is <tt>OK FSD-SET</tt>,
otherwise see the error responses in <xref target="errorresponses"></xref>.
</t>
<t>In current practice, commands such as <tt>FSD</tt> are made
available only to a privileged administrative user authorized to send
such a mission critical command.    The security provisions for
administrative users are discussed in <xref target="adsec"></xref>.
</t>
<t>Note: The symbol "<tt>FSD</tt>" is also used for an Event.
See <xref target="EventFSD"></xref>.
</t>
</section>
<section anchor="get">
<name><tt>GET</tt></name>
<t>Retrieve a single response from the Attachment Daemon. The possible
sub-commands are:
</t>
<section anchor="cmddesc">
<name><tt>GET CMDDESC</tt></name>
<t>Retrieve a text description of a command.
</t>
<t>Command: <tt>GET CMDDESC &lt;upsname&gt; &lt;cmdname&gt;</tt>
</t>
<t>Response:
<tt>CMDDESC &lt;upsname&gt; &lt;cmdname&gt; "&lt;description&gt;"</tt>
</t>
<t>For example: <tt>GET CMDDESC su700 load.on</tt> and
response <tt>CMDDESC su700 load.on "Turn on the load immediately"</tt>
</t>
<t>This is like <tt>GET DESC</tt>, but it applies to an Instant Command;.
See <xref target="desc"></xref>.
</t>
</section>
<section anchor="desc">
<name><tt>GET DESC</tt></name>
<t>Retrieve a text description of a UPS variable.  See <xref target="var"></xref>.
</t>
<t>Command: <tt>GET DESC &lt;upsname&gt; &lt;varname&gt;</tt>
</t>
<t>Response: <tt>DESC &lt;upsname&gt; &lt;varname&gt; "&lt;description&gt;"</tt>
</t>
<t>where <tt>&lt;description&gt;</tt> is a string that gives a brief
explanation of the named variable.  The Attachment Daemon <bcp14>MAY</bcp14>
return "Unavailable" if the file which provides this description is
not installed.
</t>
<t>For example command <tt>GET DESC su700 ups.status</tt> and
response <tt>DESC su700 ups.status "UPS status"</tt>
</t>
</section>
<section anchor="numattach">
<name><tt>GET NUMATTACH</tt></name>
<t>Retrieve the count kept by the Attachment Daemon of all the "<em>active</em>"
systems protected by this UPS.
</t>
<t>Command: <tt>GET NUMATTACH &lt;upsname&gt;</tt>
</t>
<t>Response: <tt>NUMATTACH &lt;upsname&gt; &lt;value&gt;</tt>
</t>
<t>where <tt>&lt;value&gt;</tt> is a count of the Primary and the
number of Secondaries currently powered by this UPS.
</t>
<t>For example command <tt>GET ATTACH su700</tt> and
response <tt>NUMATTACH su700 1</tt>
</t>
<t>This information is needed by the Management Daemon to determine how many
Secondaries are still connected during the system shutdown process.
</t>
<t>Note: Historically, this sub-command was known
as <tt>NUMLOGINS</tt>.  Since <tt>LOGIN</tt> was not the conventional
user access to a shell or program the name was changed to avoid
confusion.
</t>
</section>
<section anchor="type">
<name><tt>GET TYPE</tt></name>
<t>Retrieve the type of a UPS variable.  See <xref target="var"></xref>.
</t>
<t>Command: <tt>GET TYPE &lt;upsname&gt; &lt;varname&gt;</tt>
</t>
<t>Response: <tt>TYPE &lt;upsname&gt; &lt;varname&gt; &lt;type&gt;...</tt>
</t>
<t>where &lt;type&gt; can be one or more of the following tokens.
Multiple types may be returned.
</t>
<t>For example command <tt>GET TYPE su700 input.transfer.low</tt> and
response <tt>TYPE su700 input.transfer.low ENUM</tt>
</t>
<table>
<name>Variable Types
</name>
<thead>
<tr>
<th align="center">&nbsp;&nbsp;&nbsp;&nbsp;Type&nbsp;&nbsp;&nbsp;&nbsp;
    </th>
<th align="center">Meaning
</th>
</tr>
</thead>
<tbody>
<tr>
<td>RW </td>
<td>This is a read/write variable.  It may be read with
command <tt>GET VAR</tt>, see <xref target="getvar"></xref>, and set to a different value
with command <tt>SET</tt>, see <xref target="set"></xref>.
</td>
</tr>
<tr>
<td>ENUM </td>
<td>An enumerated type, which supports specific
predetermined values.
</td>
</tr>
<tr>
<td>STRING:n </td>
<td>This is a string of maximum
length <tt>n</tt>.
</td>
</tr>
<tr>
<td>RANGE </td>
<td><t>This is a number, either integer or float,
comprised in the range which may be seen with the command <tt>LIST
RANGE</tt>, see <xref target="range"></xref>.
</t></td>
</tr>
<tr>
<td>NUMBER </td>
<td>This is a single numeric value, either
integer or float.
</td>
</tr>
</tbody>
</table>
<t>Notes:
</t>
<ul>
<li>ENUM, STRING:n and RANGE are usually associated with RW, but
not always. The default &lt;type&gt;, when omitted, is numeric, so
either integer or float. Each Driver is then responsible for
handling values as either integer or float.
</li>
<li>Current practice is to represent floating point values using
locale <tt>C.utf8</tt> which is a decimal (base 10) US English-based
representation. Hexadecimal, exponents, and comma for thousands
separator are not allowed. For example: "1200.20" is valid, while
"1,200.20" and "1200,20" are not valid.
</li>
</ul>
</section>
<section anchor="upsdesc">
<name><tt>GET UPSDESC</tt></name>
<t>Retrieve a text description of a UPS.
</t>
<t>Command: <tt>GET UPSDESC &lt;upsname&gt;</tt>
</t>
<t>Response: <tt>UPSDESC &lt;upsname&gt; "&lt;description&gt;"</tt>
</t>
<t>where &lt;description&gt; is defined by the Attachment Daemon configuration. If
it is not set, current practice is for the Attachment Daemon to return
"Unavailable".
</t>
<t>For example command <tt>GET UPSDESC su700</tt> and response
<tt>UPSDESC su700 "Development box"</tt>
</t>
<t>This can be used to provide human-readable descriptions instead of
a cryptic <tt>ups@hostname</tt> string.
</t>
</section>
<section anchor="getvar">
<name><tt>GET VAR</tt></name>
<t>Retrieve the value of a UPS variable.  See <xref target="var"></xref>.
</t>
<t>Command: <tt>GET VAR &lt;upsname&gt;
&lt;varname&gt;</tt>
</t>
<t>Response: <tt>VAR &lt;upsname&gt; &lt;varname&gt; "&lt;value&gt;"</tt>
</t>
<t>For example command <tt>GET VAR su700 ups.status</tt> and response
<tt>VAR su700 ups.status "OB LB"</tt>
</t>
</section>
</section>
<section anchor="help">
<name><tt>HELP</tt></name>
<t>Return a list of the commands supported by the Attachment Daemon.  This command
is intended for human as well as program use.
</t>
<t>Command <tt>HELP</tt>
</t>
<t>For example, the following command line sequence executed on an
Attachment Daemon:</t>
<sourcecode>netcat localhost 3493
HELP
Commands: HELP VER GET LIST SET INSTCMD ATTACH DETACH
          USERNAME PASSWORD STARTTLS</sourcecode>
<t>Note:
Historically, this command also
returned <tt>LOGIN</tt> and <tt>LOGOUT</tt>.  Since <tt>LOGIN</tt> was
not the conventional user access to a shell or program, the command
names were changed to <tt>ATTACH</tt> and <tt>DETACH</tt> to avoid
confusion.
</t>
</section>
<section anchor="instcmd">
<name><tt>INSTCMD</tt></name>
<t>Send an Instant Command to the UPS.
</t>
<t>Command: <tt>INSTCMD &lt;upsname&gt; &lt;cmdname&gt;</tt>
</t>
<t>where <tt>&lt;upsname&gt;</tt> is the name of the UPS
and <tt>&lt;cmdname&gt;</tt> is the Instant Command to be issued to
that UPS.  See <xref target="instcmdexamples"></xref> for examples of
instant commands.
</t>
<t>If the command succeeds, the response is <tt>OK</tt>, otherwise
see the error responses, <xref target="errorresponses"></xref>.
</t>
<t>For example the command: <tt>INSTCMD su700 test.panel.start</tt>
and the response <tt>OK</tt>
</t>
</section>
<section anchor="list">
<name><tt>LIST</tt></name>
<t>All the <tt>LIST</tt> commands produce a response with a common
format. The response will begin with <tt>BEGIN LIST</tt> and then
repeat the initial query.  A list then follows, with as many lines as
are necessary.  The response ends with <tt>END LIST</tt> followed by
the initial query.
</t>
<t>The formatting may seem a bit redundant, but it makes a different
form of client possible.  A client can send a <tt>LIST</tt> command
and then wait for the response. When it arrives, the Management Daemon doesn't
need a complicated state machine to remember which list is which.
</t>
<t>Note: The current NUT Project implementation of the
Attachment Daemon, <tt>upsd</tt>, sends back the response to the <tt>LIST</tt>
command as a sequence of messages.  The Management Daemon should continue reading
these messages until it receives the line beginning <tt>END LIST</tt>.
</t>
<t>The possible subcommands are:
</t>
<section anchor="client">
<name><tt>LIST CLIENT</tt></name>
<t>The command calls for the Attachment Daemon to report all the current Management Daemon
clients of a given UPS.
</t>
<t>Command: <tt>LIST CLIENT &lt;upsname&gt;</tt>
</t>
<t>The response
is </t>
<artwork>BEGIN LIST CLIENT &lt;upsname&gt;
CLIENT &lt;upsname&gt; &lt;client_IP_address&gt;
...
END LIST CLIENT &lt;upsname&gt;
</artwork>
<t>For example, the command <tt>LIST CLIENT ups1</tt> and the response:
</t>
<artwork>BEGIN LIST CLIENT ups1
CLIENT ups1 ::1
CLIENT ups1 203.0.113.1
END LIST CLIENT ups1
</artwork>
</section>
<section anchor="cmd">
<name><tt>LIST CMD</tt></name>
<t>The command calls for the Attachment Daemon to report a list of the Instant
Commands which the Management Daemon may send to the Attachment Daemon.  This Instant Command
list is the abstracted view of the UPS hardware capabilities.  An
economical UPS will support few or no Instant Commands but a
professional model should support more.
</t>
<t>Command: <tt>LIST CMD &lt;upsname&gt;</tt>
</t>
<t>The response is:</t>
<sourcecode>BEGIN LIST CMD &lt;upsname&gt;
CMD &lt;upsname&gt; &lt;cmdname&gt;
...
END LIST CMD &lt;upsname&gt;
</sourcecode>
<t>where <tt>&lt;upsname&gt;</tt> is the name of the UPS,
and <tt>&lt;cmdname&gt;</tt> is the name of the Instant Command which
may be issued to the UPS.
</t>
<t>For example the command: <tt>LIST CMD su700</tt> and the response:
</t>
<sourcecode>BEGIN LIST CMD su700
CMD su700 load.on
CMD su700 test.panel.start
...
END LIST CMD su700
</sourcecode>
</section>
<section anchor="enum">
<name><tt>LIST ENUM</tt></name>
<t>The command calls for the Attachment Daemon to report the set of possible
values of a UPS variable which has predetermined values.
</t>
<t>Command: <tt>LIST ENUM &lt;upsname&gt; &lt;varname&gt;</tt>
</t>
<t>The response
is:</t>
<sourcecode>BEGIN LIST ENUM &lt;upsname&gt; &lt;varname&gt;
ENUM &lt;upsname&gt; &lt;varname&gt; "&lt;value&gt;"
...
END LIST ENUM &lt;upsname&gt; &lt;varname&gt;
</sourcecode>
<t>where <tt>&lt;upsname&gt;</tt> is the name of the UPS,
<tt>&lt;varname&gt;</tt> is the UPS variable and <tt>&lt;value&gt;</tt> is
one of the possible values of that UPS variable.  Note that in current
practice the output is an unordered list.  Note also that the U+0022
QUOTATION MARK characters are part of the response.
</t>
<t>For example the command: <tt>LIST ENUM su700 input.transfer.low</tt>
and the
response:</t>
<sourcecode>BEGIN LIST ENUM su700 input.transfer.low
ENUM su700 input.transfer.low "103"
ENUM su700 input.transfer.low "100"
...
END LIST ENUM su700 input.transfer.low
</sourcecode>
</section>
<section anchor="range">
<name><tt>LIST RANGE</tt></name>
<t>The command calls for the Attachment Daemon to report the interval in which
valid values of UPS variable lie.
</t>
<t>Command: <tt>LIST RANGE &lt;upsname&gt; &lt;varname&gt;</tt>
</t>
<t>The response
is: </t>
<sourcecode>BEGIN LIST RANGE &lt;upsname&gt; &lt;varname&gt;
RANGE &lt;upsname&gt; &lt;varname&gt; "&lt;min&gt;" "&lt;max&gt;"
...
END LIST RANGE &lt;upsname&gt; &lt;varname&gt;
</sourcecode>
<t>where <tt>&lt;upsname&gt;</tt> is the name of the UPS,
<tt>&lt;varname&gt;</tt> is the UPS variable and
{<tt>&lt;min&gt;</tt>,<tt>&lt;max&gt;</tt>} is the interval of valid
values of that UPS variable.  Note that the U+0022 QUOTATION MARK
characters are part of the response.
</t>
<t>For example, the command <tt>LIST RANGE su700
input.transfer.low</tt> and the response:
</t>
<sourcecode>BEGIN LIST RANGE su700 input.transfer.low
RANGE su700 input.transfer.low "90" "105"
END LIST RANGE su700 input.transfer.low
</sourcecode>
</section>
<section anchor="listrw">
<name><tt>LIST RW</tt></name>
<t>The command calls for the Attachment Daemon to report a list of the UPS
variables associated with a given UPS which may be read and written by
the Management Daemon.  These variables are the abstracted view of the UPS
hardware capabilities.  An economical UPS may support few variables
but a professional model should support at least the variables which
are needed for an automatic shutdown and restart,
see <xref target="shutdownstory"></xref>.  See
also <xref target="MinSup"></xref> for details of the recommended
minimum support of variables.  A full list of variables is available
in <xref target="gitvars">source code file docs/nut-names.txt</xref>
which serves as the Recording Document.
</t>
<t>Command: <tt>LIST RW &lt;upsname&gt;</tt>
</t>
<t>The response is:</t>
<sourcecode>BEGIN LIST RW &lt;upsname&gt;
RW &lt;upsname&gt; &lt;varname&gt; "&lt;value&gt;"
...
END LIST RW &lt;upsname&gt;
</sourcecode>
<t>where <tt>&lt;upsname&gt;</tt> is the name of the UPS,
<tt>&lt;varname&gt;</tt> is the UPS variable and
<tt>&lt;value&gt;</tt> is the value of that UPS variable.  Note that
the U+0022 QUOTATION MARK characters are part of the response.
</t>
<t>For example the command: <tt>LIST RW su700</tt> and the response:
</t>
<sourcecode>BEGIN LIST RW su700
RW su700 output.voltage.nominal "115"
RW su700 ups.delay.shutdown "020"
...
END LIST RW su700
</sourcecode>
</section>
<section anchor="ups">
<name><tt>LIST UPS</tt></name>
<t>The command calls for the Attachment Daemon to report a list of the UPS units
to which it is attached.
</t>
<t>Command: <tt>LIST UPS</tt>
</t>
<t>The response is:</t>
<sourcecode>BEGIN LIST UPS
UPS &lt;upsname&gt; "&lt;description&gt;"
...
END LIST UPS
</sourcecode>
<t>where <tt>&lt;upsname&gt;</tt> is the name of a UPS, and
<tt>&lt;description&gt;</tt> is the description maintained by the Attachment Daemon if
available. It is set to "Unavailable" otherwise.  Note that the U+0022
QUOTATION MARK characters are part of the response.
</t>
<t>This command can also be used to determine what values of
<tt>&lt;upsname&gt;</tt> are valid before calling other functions on
the server. This is also a good way to handle situations where a
single Attachment Daemon supports multiple UPS's.  It is also useful for clients
which perform a UPS discovery process.
</t>
<t>For example, the response:
</t>
<sourcecode>BEGIN LIST UPS
UPS su700 "Development box"
END LIST UPS
</sourcecode>
</section>
<section anchor="listvar">
<name><tt>LIST VAR</tt></name>
<t>The command calls for the Attachment Daemon to report a list of all the UPS
variables which it maintains for a given UPS, and the values of those
UPS variables.
</t>
<t>Command: <tt>LIST VAR &lt;upsname&gt;</tt>
</t>
<t>The response is:</t>
<sourcecode>BEGIN LIST VAR &lt;upsname&gt;
VAR &lt;upsname&gt; &lt;varname&gt; "&lt;value&gt;"
...
END LIST VAR &lt;upsname&gt;
</sourcecode>
<t>where <tt>&lt;upsname&gt;</tt> is the name of the UPS,
<tt>&lt;varname&gt;</tt> is the UPS variable and
<tt>&lt;value&gt;</tt> is the value of that variable.  Note that
the U+0022 QUOTATION MARK characters are part of the response.
</t>
<t>The response to this command lists the UPS variables available for
this UPS and their current values.  For example the command <tt>LIST
VAR su700</tt> and the response:
</t>
<sourcecode>BEGIN LIST VAR su700
VAR su700 ups.mfr "Example Mfg"
VAR su700 ups.mfr.date "10/17/96"
...
END LIST VAR su700</sourcecode>
<t>See
<xref target="MinSup"></xref> for details of the recommended minimum
support of variables.  A full list of variables is available
in <xref target="gitvars">source code file docs/nut-names.txt</xref>
which serves as the Recording Document.
</t>
</section>
</section>
<section anchor="password">
<name><tt>PASSWORD</tt></name>
<t>This command is a companion to <tt>USERNAME</tt>, and is used by a
Management Daemon to specify the password required to enter a Session with the
Attachment Daemon, see <xref target="sess"></xref>.
</t>
<t>Command: <tt>PASSWORD &lt;password&gt;</tt>
</t>
<t>If the command succeeds, the response is <tt>OK</tt>, otherwise see
the error responses, <xref target="errorresponses"></xref>.
</t>
<t>For examples of the use of commands <tt>USERNAME</tt>
and <tt>PASSWORD</tt> by administrative users,
see <xref target="adsecclient"></xref>.
</t>
</section>
<section anchor="primary">
<name><tt>PRIMARY</tt></name>
<t>In current practice, the Attachment Daemon records in local
file <tt>upsd.users</tt> that an administrative user is a Primary.
See <xref target="adminuser"></xref> for an example.  When a Management Daemon
starts up and opens a Session with the Attachment Daemon, it lays claim to being a
Primary by sending command <tt>PRIMARY</tt> to the Attachment Daemon, thus
claiming that it has the required authority to perform such critical
actions as setting status symbol <tt>FSD</tt>.
</t>
<t>Command: <tt>PRIMARY &lt;upsname&gt;</tt>
</t>
<t>where <tt>&lt;upsname&gt;</tt> is the name of the UPS.
</t>
<t>If the Attachment Daemon has the authority, the response is <tt>OK</tt>,
otherwise see the error
responses in <xref target="errorresponses"></xref>.
</t>
<t>Note: Historically, this command was known as <tt>MASTER</tt>.
</t>
</section>
<section anchor="protver">
<name><tt>PROTVER</tt></name>
<t>Return the implementation version of the command/response protocol
used by the Attachment Daemon.  This command is intended for human as well as
program use.
</t>
<t>Command <tt>PROTVER</tt>
</t>
<t>For example, the following command line sequence in the Attachment Daemon:
</t>
<sourcecode>netcat localhost 3493
PROTVER
1.3</sourcecode>
<t>Notes:
</t>
<ol spacing="compact" indent="adaptive">
<li>There are no U+0022 QUOTATION MARK characters in the response.
</li>
<li>Historically, this command was known as <tt>NETVER</tt> and
current practice is to use <tt>NETVER</tt> instead of <tt>PROTVER</tt>.
</li>
<li>The implementation version of the protocol returned
by <tt>PROTVER</tt> is different to the implementation version of the
Attachment Daemon returned by
<tt>VER</tt>.
</li>
<li>The protocol version 1.3 requires support of the commands used in
previous protocol version 1.2 aliases.
</li>
</ol>
</section>
<section anchor="set">
<name><tt>SET</tt></name>
<t>The command calls for the Attachment Daemon to set a UPS variable to a given
value.  Whether this has an effect on the UPS hardware is specific to
the Driver and the UPS model.  Some variables are read-only due to the
design of the UPS or its driver.
</t>
<t>Command: <tt>SET VAR &lt;upsname&gt; &lt;varname&gt;
"&lt;value&gt;"</tt>
</t>
<t>where <tt>&lt;upsname&gt;</tt> is the name of the UPS,
<tt>&lt;varname&gt;</tt> is the UPS variable and
<tt>&lt;value&gt;</tt> is the value to be assigned to that variable.
Note that the U+0022 QUOTATION MARK characters are part of the
command.
</t>
<t>If the command succeeds, the response is <tt>OK</tt>, otherwise see
the error responses in <xref target="errorresponses"></xref>.
</t>
<t>For example the command: <tt>SET VAR su700 ups.id "My UPS"</tt> and
the response <tt>OK</tt>
</t>
</section>
<section anchor="starttls">
<name><tt>STARTTLS</tt></name>
<t>The client tells the Attachment Daemon to switch to
TLS <xref target="RFC8446"></xref> encrypted communication.  When the
client receives <tt>OK</tt> it also switches to TLS encryption.
</t>
<t>Command: <tt>STARTTLS</tt>
</t>
<t>If the command succeeds, the response is <tt>OK STARTTLS</tt>,
otherwise see the error responses
in <xref target="errorresponses"></xref>.
</t>
<t>If the client does not send command STARTTLS to the Attachment Daemon
communication continues unencrypted, however an
Attachment Daemon <bcp14>MAY</bcp14> refuse unencrypted communication.
</t>
<t>Notes:</t>
<ol indent="adaptive">
<li>NUT 2.8.0 supports the encryption of communications between the
Attachment Daemon and the Management Daemon using TLS
1.3 <xref target="RFC8446"></xref> with X.509 v3 certificates as
defined by RFC5280 <xref target="RFC5280"></xref> and updates.
</li>
<li>In the closely restrained world of UPS management, it may be
possible to obtain better security usig self-signed certificates.
</li>
</ol>
</section>
<section anchor="username">
<name><tt>USERNAME</tt></name>
<t>The Attachment Daemon limits access to clients whose credentials match those in
the file <tt>upsd.users</tt>.  There is no anonymous access.  A Management Daemon
program or script uses command <tt>USERNAME</tt> and its companion
command <tt>PASSWORD</tt> to open a Session with the Attachment Daemon for an
administrative user, Note that this command is for program or script
use and is not the familiar login command typed on a command line to
gain access to a shell.
</t>
<t>Command: <tt>USERNAME &lt;username&gt;</tt>
</t>
<t>If the command succeeds, the response is <tt>OK</tt>, otherwise see
the error responses in <xref target="errorresponses"></xref>.
</t>
<t>For examples of the use of commands <tt>USERNAME</tt> and
<tt>PASSWORD</tt> by administrative users,
see <xref target="adsecclient"></xref>.
</t>
</section>
<section anchor="ver">
<name><tt>VER</tt></name>
<t>Return the implementation version of the Attachment Daemon.  This command is
intended for human as well as program use.
</t>
<t>Command <tt>VER</tt>
</t>
<t>For example, the following command line sequence:
</t>
<sourcecode>netcat localhost 3493
VER
Network UPS Tools upsd 2.8.0 - http://www.networkupstools.org/
</sourcecode>
<t>Notes:
</t>
<ol spacing="compact" indent="adaptive">
<li>There are no U+0022 QUOTATION MARK characters in the response.
</li>
<li>The implementation version of the Attachment Daemon returned by VER is
different to the protocol version returned by <tt>PROTVER</tt>.
</li>
<li>NUT version 2.8.0 supports the commands used in previous version
2.7.4 as aliases.
</li>
</ol>
</section>
</section>
<section anchor="responses">
<name>Summary of Responses</name>
<section anchor="success">
<name>Response when Command Succeeds</name>
<t>If the command succeeds, the response has the following
command-dependent form:
</t>
<table>
<name>Response if command succeeds
</name>
<thead>
<tr>
<th>Command           </th>
<th>Response             </th>
<th>Note       </th>
<th>Reference  
</th>
</tr>
</thead>
<tbody>
<tr>
<td><tt>ATTACH</tt>   </td>
<td><tt>OK</tt>          </td>
<td>Was LOGIN  </td>
<td><xref target="attach"></xref>
</td>
</tr>
<tr>
<td><tt>DETACH</tt>   </td>
<td><tt>OK Goodbye</tt>  </td>
<td>Was LOGOUT </td>
<td><xref target="detach"></xref>           
</td>
</tr>
<tr>
<td><tt>FSD</tt>      </td>
<td><tt>OK FSD-SET</tt>  </td>
<td>	          </td>
<td><xref target="FSD"></xref>     
</td>
</tr>
<tr>
<td><tt>GET</tt>      </td>
<td>Sub command specific </td>
<td>	          </td>
<td><xref target="get"></xref>           
</td>
</tr>
<tr>
<td><tt>HELP</tt>     </td>
<td>List of commands     </td>
<td>	          </td>
<td><xref target="help"></xref>           
</td>
</tr>
<tr>
<td><tt>INSTCMD</tt>  </td>
<td><tt>OK </tt>         </td>
<td>	          </td>
<td><xref target="instcmd"></xref>           
</td>
</tr>
<tr>
<td><tt>LIST</tt>     </td>
<td>Sub command specific </td>
<td>	          </td>
<td><xref target="list"></xref>           
</td>
</tr>
<tr>
<td><tt>PASSWORD</tt> </td>
<td><tt>OK</tt>          </td>
<td>	          </td>
<td><xref target="password"></xref>
</td>
</tr>
<tr>
<td><tt>PRIMARY</tt>  </td>
<td><tt>OK</tt>          </td>
<td>	          </td>
<td><xref target="primary"></xref>
</td>
</tr>
<tr>
<td><tt>PROTVER</tt>  </td>
<td>Protocol version     </td>
<td>Was NETVER </td>
<td><xref target="protver"></xref>           
</td>
</tr>
<tr>
<td><tt>SET</tt>      </td>
<td><tt>OK</tt>          </td>
<td>	          </td>
<td><xref target="set"></xref>
</td>
</tr>
<tr>
<td><tt>STARTTLS</tt> </td>
<td><tt>OK STARTTLS</tt> </td>
<td>	          </td>
<td><xref target="starttls"></xref>           
</td>
</tr>
<tr>
<td><tt>USERNAME</tt> </td>
<td><tt>OK</tt>          </td>
<td>	          </td>
<td><xref target="username"></xref>
</td>
</tr>
<tr>
<td><tt>VER</tt>      </td>
<td>Program version      </td>
<td>	          </td>
<td><xref target="ver"></xref>
</td>
</tr>
</tbody>
</table>
</section>
<section anchor="errorresponses">
<name>Error Responses</name>
<t>Error responses have the following format:
</t>
<sourcecode>ERR &lt;error-name&gt; [&lt;extra&gt;]
</sourcecode>
<t>where <tt>&lt;error-name&gt;</tt> is a single word token taken from
the 27 characters A-Z and U+002D
HYPHEN-MINUS. Implementations <bcp14>MAY</bcp14> if needed add an
additional optional <tt>&lt;extra&gt;</tt>.  Current practice does not
make use of this possibility.
</t>
<t>The <tt>&lt;error-name&gt;</tt> may have one of the following
values:
</t>
<table anchor="errors">
<name>Error responses
</name>
<thead>
<tr>
<th align="center">&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;error&nbsp;name&nbsp;token&nbsp;&nbsp;&nbsp;&nbsp;
               <br/><tt>&lt;error-name&gt;</tt>
    </th>
<th align="center">Meaning
</th>
</tr>
</thead>
<tbody>
<tr>
<td><tt>ACCESS-DENIED</tt></td>
<td>The client's host and/or
authentication details supplied by <tt>USERNAME</tt>
and <tt>PASSWORD</tt> are not sufficient to execute the requested
command.
</td>
</tr>
<tr>
<td><tt>ALREADY-ATTACHED</tt></td>
<td><t>The client has already sent a
successful <tt>ATTACH</tt> command for a given UPS and can't do it again.
</t><t>Note: Historically, this error response was <tt>ALREADY-LOGGED-IN</tt>.
</t></td>
</tr>
<tr>
<td><tt>ALREADY-SET-PASSWORD</tt></td>
<td>The client has already
supplied a <tt>PASSWORD</tt> and is attempting to repeat the command
in the same Session.
</td>
</tr>
<tr>
<td><tt>ALREADY-SET-USERNAME</tt></td>
<td>The client has already
supplied a <tt>USERNAME</tt>, and is attempting to repeat the command
within the same Session.
</td>
</tr>
<tr>
<td><tt>CMD-NOT-SUPPORTED</tt></td>
<td>The specified UPS doesn't
support the Instant Command.
</td>
</tr>
<tr>
<td><tt>DATA-STALE</tt></td>
<td><t>The Attachment Daemon is connected to the
Driver for the UPS, but that driver isn't providing regular updates
or has specifically marked the data as stale.  Current practice is for
the Attachment Daemon to refuse to provide the Management Daemon with variables on stale units
to avoid false readings.
</t><t>This generally means that the Driver is running, but it has lost
communication with the hardware. Check the physical connection to the
equipment.
</t></td>
</tr>
<tr>
<td><tt>DRIVER-NOT-CONNECTED</tt></td>
<td>The Attachment Daemon can't perform the
requested command, since the Driver for that UPS is not
connected. This usually means that the driver is not running, or if it
is, is misconfigured.
</td>
</tr>
<tr>
<td><tt>FEATURE-NOT-CONFIGURED</tt></td>
<td>This instance of the Attachment Daemon
hasn't been configured properly to allow the requested feature to
operate. In current practice this error response is possible only for
command <tt>STARTTLS</tt>.
</td>
</tr>
<tr>
<td><tt>FEATURE-NOT-SUPPORTED</tt></td>
<td>This instance of Attachment Daemon does
not support the requested feature.  In current practice this error
response is possible only for command <tt>STARTTLS</tt>.
</td>
</tr>
<tr>
<td><tt>INSTCMD-FAILED</tt></td>
<td>The Attachment Daemon failed to deliver the
Instant Command request to the Driver. No further information is
available to the client. This typically indicates a dead or broken
driver.
</td>
</tr>
<tr>
<td><tt>INVALID-ARGUMENT</tt></td>
<td>The client sent an argument to a
command which is not recognized or is otherwise not valid in this
context. This is typically caused by sending a valid command such as
<tt>GET</tt> with a subcommand which is not valid.
</td>
</tr>
<tr>
<td><tt>INVALID-PASSWORD</tt></td>
<td>The client sent a non valid
<tt>PASSWORD</tt>.
</td>
</tr>
<tr>
<td><tt>INVALID-USERNAME</tt></td>
<td>The client sent an non valid
<tt>USERNAME</tt>.
</td>
</tr>
<tr>
<td><tt>INVALID-VALUE</tt></td>
<td>The value specified in the request
is not valid. This usually applies to a <tt>SET</tt> of
an <tt>ENUM</tt> type which is using a value not in the list of
allowed values.  See <xref target="enum"></xref>.
</td>
</tr>
<tr>
<td><tt>PASSWORD-REQUIRED</tt></td>
<td>The command requires a
previous <tt>PASSWORD</tt> for authentication, but the client hasn't
provided one.
</td>
</tr>
<tr>
<td><tt>READONLY</tt></td>
<td>The requested variable in a <tt>SET</tt>
command is not writable.
</td>
</tr>
<tr>
<td><tt>SET-FAILED</tt></td>
<td>The Attachment Daemon failed to deliver
the <tt>SET</tt> request to the Driver. This is similar
to <tt>INSTCMD-FAILED</tt>.
</td>
</tr>
<tr>
<td><tt>TLS-ALREADY-ENABLED</tt></td>
<td><t>TLS mode is already enabled
on this connection, so the Attachment Daemon can't start it again.
</t><t>Note: Historically, this message was <tt>ALREADY-SSL-MODE.</tt>
</t></td>
</tr>
<tr>
<td><tt>TLS-NOT-ENABLED</tt></td>
<td><t>TLS mode is required but has
not yet been enabled on this connection, so the Attachment Daemon can't send
commands.
</t><t>Note: This message is experimental and not in current common
use.
</t></td>
</tr>
<tr>
<td><tt>TOO-LONG</tt></td>
<td>The requested value in a <tt>SET</tt>
command is too long.
</td>
</tr>
<tr>
<td><tt>UNKNOWN-COMMAND</tt></td>
<td>The Attachment Daemon doesn't recognize the
command.
</td>
</tr>
<tr>
<td><tt>UNKNOWN-UPS</tt></td>
<td>The UPS specified in the request is
not known to the Attachment Daemon. This usually means that it didn't match
anything in the Attachment Daemon configuration.
</td>
</tr>
<tr>
<td><tt>USERNAME-REQUIRED</tt></td>
<td>The command requires
a <tt>USERNAME</tt> for authentication, but the client hasn't provided
one.
</td>
</tr>
<tr>
<td><tt>VAR-NOT-SUPPORTED</tt></td>
<td>The specified UPS doesn't
support the UPS variable in the command.
</td>
</tr>
</tbody>
</table>
</section>
</section>
<section anchor="ABNF">
<name>An ABNF of the Commands</name>
<t>This section repeats the syntax of <xref target="commands"></xref>,
but in Augmented Bachus-Naur Form (ABNF).  It does not define any
additional feature.  For further details of each command and the
response, see <xref target="commands"></xref>.
</t>
<t>The commands may be presented in ABNF
<xref target="RFC5234"></xref>, <xref target="RFC7405"></xref>, and
represented using Unicode <xref target="ISOIEC10646"></xref> and
encoded in UTF-8 <xref target="RFC5198"></xref>, a transformation
format of ISO 10646.
</t>
<t>In this ABNF, non-terminals are written in lower case letters,
terminals are written in upper case letters.  User supplied values are
written in lower case letters and are enclosed between Less-Than Sign
U+003C and Grater-Than Sign U+003E: <tt>&lt;cmdname&gt;</tt> is
defined in <xref target="cmddesc"></xref>,
<tt>&lt;value&gt;</tt> is defined in <xref target="set"></xref>,
<tt>&lt;varname&gt;</tt> is defined in <xref target="cmddesc"></xref>, 
<tt>&lt;upsname&gt;</tt> is defined in <xref target="attach"></xref> and
<tt>&lt;username&gt;</tt> is defined in <xref target="username"></xref>.
  Current practice
tolerates mixed case command names, but it is RECOMMENDED to use upper
case only for commands.  See <xref target="fig.ABNF"></xref>.
</t>
<figure anchor="fig.ABNF" align="center">
<name>ABNF for the Commands
</name>
<sourcecode type="abnf">
   command = attach / detach / fsd / %s"GET" getsubcommand / help /
             instcmd / %s"LIST" listsubcommand / password / primary / 
             protver / set / starttls / username / ver
   attach = %s"ATTACH" &lt;upsname&gt;
   detach = %s"DETACH"
   fsd = %s"FSD" &lt;upsname&gt;
   getsubcommand = getcmddesc / getdesc / getnumattach / gettype /
                   getupsdesc / getvar
   getcmddesc = %s"CMDDESC" &lt;upsname&gt; &lt;cmdname&gt;
   getdesc = %s"DESC" &lt;upsname&gt; &lt;varname&gt;
   getnumattach = %s"NUMATTACH" &lt;upsname&gt;
   gettype = %s"TYPE" &lt;upsname&gt; &lt;varname&gt;
   getupsdesc = %s"UPSDESC" &lt;upsname&gt;
   getvar = %s"VAR" &lt;upsname&gt; &lt;varname&gt;
   help = %s"HELP"
   instcmd = %s"INSTCMD" &lt;upsname&gt; &lt;cmdname&gt;
   listsubcommand = listclient / listcmd / listenum / listrange / listrw /
                    listups / listvar
   listclient = %s"CLIENT" &lt;upsname&gt;
   listcmd = %s"CMD" &lt;upsname&gt;
   listenum = %s"ENUM" &lt;upsname&gt; &lt;varname&gt;
   listrange = %s"RANGE" &lt;upsname&gt; &lt;varname&gt;
   listrw = %s"RW" &lt;upsname&gt;
   listups = %s"UPS"
   listvar = %s"VAR" &lt;upsname&gt;
   password = %s"PASSWORD" &lt;password&gt;
   primary = %s"PRIMARY" &lt;upsname&gt;
   protver = %s"PROTVER"
   set = %s"SET" %s"VAR" &lt;upsname&gt; &lt;varname&gt; U+0022&lt;value&gt;U+0022
   starttls = %s"STARTTLS"
   username = %s"USERNAME" &lt;username&gt;
   ver = %s"VER"
</sourcecode>
</figure>
</section>
</section>
<section>
<name>Statuses and Events</name>
<section anchor="symbols">
<name>Status Symbols</name>
<t>These symbols resume the abstracted view of the UPS hardware
maintained by the Attachment Daemon.  The variable <tt>ups.status</tt> contains
one or more space-separated status symbols which together describe the
UPS state at that instant.  In current practice the Management Daemon will poll
variable <tt>ups.status</tt> every 5 seconds with a command such
as <tt>GET VAR su700 ups.status</tt> and response <tt>VAR su700
ups.status "OB LB"</tt> to discover changes in the UPS status.  These
changes will indicate UPS events.
</t>
<table>
<name>UPS Status Symbols
</name>
<thead>
<tr>
<th align="center">Status Symbol </th>
<th align="center">Meaning
</th>
</tr>
</thead>
<tbody>
<tr>
<td><tt>ALARM</tt>
</td>
<td>The UPS reports that it requires intervention.
</td>
</tr>
<tr>
<td><tt>BOOST</tt>
</td>
<td>The UPS has determined that the voltage level of the public power supply is
too low, and is boosting it to the required level.  The UPS continues
to supply the protected system from the public power supply.
</td>
</tr>
<tr>
<td><tt>BYPASS</tt>
</td>
<td>The UPS is feeding current directly from the public power supply to the
protected system.  The backup facilities are disconnected.  This state
allows maintenance personnel to change the batteries without
interrupting the protected system.
</td>
</tr>
<tr>
<td><tt>CAL</tt>
</td>
<td>The UPS is calibrating itself, for example to determine at what
charge the <tt>LB</tt> status is raised or lowered.
</td>
</tr>
<tr>
<td><tt>CHRG</tt>
</td>
<td><t>The UPS battery is charging.  This usually implies that the UPS
also has status <tt>OL</tt>, but may not be the case if the UPS also has
status <tt>OFF</tt>.
</t></td>
</tr>
<tr>
<td><tt>COMM</tt>
</td>
<td>The Attachment Daemon has effective contact with the UPS.
</td>
</tr>
<tr>
<td><tt>DISCHRG</tt>
</td>
<td><t>The UPS battery is discharging.  This usually implies that the UPS
also has status <tt>OB</tt>, but may not be the case if the UPS also has
status <tt>OFF</tt>.
</t></td>
</tr>
<tr>
<td><tt>FSD</tt>
</td>
<td>This "Forced Shutdown" status signals that the final shutdown
sequence has begun.
</td>
</tr>
<tr>
<td><tt>LB</tt>
</td>
<td>Low Battery. The battery level of the UPS is below a chosen limit.
The UPS may be in status <tt>OL</tt> or <tt>OB</tt>.
</td>
</tr>
<tr>
<td><tt>NOCOMM</tt>
</td>
<td>The Attachment Daemon has no effective contact with the UPS.
</td>
</tr>
<tr>
<td><tt>OB</tt>
</td>
<td>On Battery. The UPS is taking energy from it's battery.
The battery is discharging.  A UPS must have status <tt>OB</tt> or <tt>OL</tt>,
otherwise it is deemed dead.
</td>
</tr>
<tr>
<td><tt>OFF</tt>
</td>
<td>The UPS is in state "Off".  It does not react to failure in the
public power supply.  The exact meaning depends on the model.
</td>
</tr>
<tr>
<td><tt>OL</tt>
</td>
<td>Online. The UPS is online, receiving energy from the public power supply.  The
battery is charging.  A UPS must have status <tt>OB</tt> or <tt>OL</tt>, otherwise
it is deemed dead.
</td>
</tr>
<tr>
<td><tt>OVER</tt>
</td>
<td>Overloaded. The UPS reports that the load on it is beyond it's
normal operating maximum.
</td>
</tr>
<tr>
<td><tt>RB</tt>
</td>
<td>Replace battery. The UPS reports that it's battery/batteries should
be replaced.
</td>
</tr>
<tr>
<td><tt>TEST</tt>
</td>
<td>Under test. The UPS is currently undergoing a test, which may have
been called for manually or internally.
</td>
</tr>
<tr>
<td><tt>TICK</tt>
</td>
<td>Heartbeat. A software UPS in the Attachment Daemon provides a regular signal
monitored by the Management Daemon as a way of verifying effective end-to-end
management. <tt>TICK</tt> and <tt>TOCK</tt> are companions, they are considered
experimental.
</td>
</tr>
<tr>
<td><tt>TOCK</tt>
</td>
<td>Heartbeat. See <tt>TICK</tt>
</td>
</tr>
<tr>
<td><tt>TRIM</tt>
</td>
<td>The UPS has determined that the voltage level of the public power supply is
too high, and is reducing it to the required level.  The UPS continues
to supply the protected system from the public power supply.
</td>
</tr>
</tbody>
</table>
</section>
<section anchor="events">
<name>Events</name>
<t>A Management Daemon detects the occurrence of a UPS Event from a change in the
UPS status received from the Attachment Daemon.  The following table summarizes
the process. A status of "none" means that the status symbol is not
present in the variable <tt>ups.status</tt>.
</t>
<t>The Management Daemon should retrieve the variable <tt>ups.status</tt> from the
Attachment Daemon at regular intervals.  If the interval is too short, compute and
network resources will be wasted, but if the interval is too large,
the Management Daemon risks missing short-lived changes in the UPS status.
</t>
<t>A default value of 5 seconds is <bcp14>RECOMMENDED</bcp14>, but an
implementation
<bcp14>MAY</bcp14> make this value configurable.  By default the "old"
status is therefore the previous value retrieved 5 seconds ago.
</t>
<t>Current practice is for the Management Daemon to assign names to certain
events.  These is shown in the table in parentheses.
</t>
<table>
<name>Event deduction from status changes
</name>
<thead>
<tr>
<th>Old status  </th>
<th>New status  </th>
<th>Event                    </th>
<th>&nbsp;&nbsp;&nbsp;&nbsp;
    </th>
<th>Old status  </th>
<th>New status  </th>
<th>Event
</th>
</tr>
</thead>
<tbody>
<tr>
<td>none        </td>
<td><tt>ALARM</tt>    </td>
<td>Alarm on                 </td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
<td><tt>ALARM</tt>    </td>
<td>none        </td>
<td>Alarm off
</td>
</tr>
<tr>
<td>none        </td>
<td><tt>BOOST</tt>    </td>
<td>Boosting voltage         </td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
<td><tt>BOOST</tt>    </td>
<td>none        </td>
<td>Not boosting
</td>
</tr>
<tr>
<td>none        </td>
<td><tt>BYPASS</tt>   </td>
<td>Bypass on                </td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
<td><tt>BYPASS</tt>   </td>
<td>none        </td>
<td>Bypass off
</td>
</tr>
<tr>
<td>none        </td>
<td><tt>CAL</tt>      </td>
<td>Calibrating              </td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
<td><tt>CAL</tt>      </td>
<td>none        </td>
<td>Not calibrating
</td>
</tr>
<tr>
<td>none        </td>
<td><tt>CHRG</tt>     </td>
<td>Charging                 </td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
<td><tt>CHRG</tt>     </td>
<td>none        </td>
<td>Not charging
</td>
</tr>
<tr>
<td>none        </td>
<td><tt>COMM</tt>     </td>
<td>UPS communicating<br/>(Event <tt>COMMOK</tt>)     </td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
<td><tt>COMM</tt>     </td>
<td>none        </td>
<td>See note <xref target="DDD" format="counter"></xref>
</td>
</tr>
<tr>
<td>none        </td>
<td><tt>DISCHRG</tt>  </td>
<td>Discharging              </td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
<td><tt>DISCHRG</tt>  </td>
<td>none        </td>
<td>Not discharging
</td>
</tr>
<tr anchor="EventFSD">
<td>none        </td>
<td><tt>FSD</tt> </td>
<td>System shutdown<br/>(Events <tt>FSD</tt>, <tt>SHUTDOWN</tt>)      </td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
<td><tt>FSD</tt> </td>
<td>none       </td>
<td>Shutdown abandoned.  See note <xref target="AAA" format="counter"></xref>
</td>
</tr>
<tr>
<td>none        </td>
<td><tt>LB</tt>       </td>
<td>Low battery.  See note <xref target="BBB" format="counter"></xref> (Event <tt>LOWBATT</tt>) </td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
<td><tt>LB</tt>       </td>
<td>none        </td>
<td>Battery not low
</td>
</tr>
<tr>
<td>none        </td>
<td><tt>NOCOMM</tt>   </td>
<td>UPS dead?  See note <xref target="DDD" format="counter"></xref><br/>(Events <tt>COMMBAD</tt>, <tt>NOCOMM</tt>) </td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
<td><tt>NOCOMM</tt>   </td>
<td>none        </td>
<td>See note <xref target="DDD" format="counter"></xref>
</td>
</tr>
<tr>
<td>none        </td>
<td><tt>OFF</tt>      </td>
<td>UPS turned off           </td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
<td><tt>OFF</tt>      </td>
<td>none        </td>
<td>UPS not turned off
</td>
</tr>
<tr>
<td><tt>OB</tt>       </td>
<td><tt>OL</tt>       </td>
<td>Receiving power<br/>(Event <tt>ONLINE</tt>)  </td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
<td><tt>OL</tt>       </td>
<td><tt>OB</tt>       </td>
<td>Power lost<br/>(Event <tt>ONBATT</tt>)
</td>
</tr>
<tr>
<td>none        </td>
<td><tt>OVER</tt>     </td>
<td>UPS overloaded           </td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
<td><tt>OVER</tt>     </td>
<td>none        </td>
<td>Overload gone
</td>
</tr>
<tr>
<td>none        </td>
<td><tt>RB</tt>       </td>
<td>Replace battery<br/>(Event <tt>REPLBATT</tt>)     </td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
<td><tt>RB</tt>       </td>
<td>none        </td>
<td>Replacement canceled
</td>
</tr>
<tr>
<td>none        </td>
<td><tt>TEST</tt>     </td>
<td>Test starts              </td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
<td><tt>TEST</tt>     </td>
<td>none        </td>
<td>Test finished
</td>
</tr>
<tr>
<td>none        </td>
<td><tt>TICK</tt>     </td>
<td>Heartbeat event.  See note <xref target="CCC" format="counter"></xref> </td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
<td><tt>TICK</tt>     </td>
<td>none        </td>
<td>No heartbeat.   See note <xref target="CCC" format="counter"></xref>
</td>
</tr>
<tr>
<td>none        </td>
<td><tt>TOCK</tt>     </td>
<td>Heartbeat event.  See note <xref target="CCC" format="counter"></xref> </td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
<td><tt>TOCK</tt>     </td>
<td>none        </td>
<td>No heartbeat.  See note <xref target="CCC" format="counter"></xref>
</td>
</tr>
<tr>
<td>none        </td>
<td><tt>TRIM</tt>     </td>
<td>Trimming voltage         </td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
<td><tt>TRIM</tt>     </td>
<td>none        </td>
<td>Not trimming
</td>
</tr>
</tbody>
</table>
<t>Notes
</t>
<ol spacing="compact" indent="adaptive">
<li anchor="AAA">Current practice does not include this event.
</li>
<li anchor="BBB">If the status <tt>OB</tt> is present, current practice
takes Management Daemon reception of <tt>LB</tt> as an order to perform an emergency
system shutdown.
</li>
<li anchor="CCC">The use of a software defined UPS to provide a
heartbeat is experimental and is not part of common current practice.
</li>
<li anchor="DDD">Current practice is: if the UPS has not responded for
15 seconds, the Management Daemon assumes that the UPS is "<em>dead</em>"
(Event <tt>NOCOMM</tt>), and if the last known <tt>OL</tt>/<tt>OB</tt> status was <tt>OB</tt> a
system shutdown, command <tt>FSD</tt>, is called for.
</li>
</ol>
</section>
</section>
<section anchor="Sec">
<name>Security Considerations</name>
<section anchor="weak">
<name>Current General Security Practice</name>
<t>Experience over the last 20 years shows that new UPS management
software releases are not frequent, and when installed, stay
unmodified for some years.  This is probably because UPS management is
a mature hardware dependent activity.  A limited number of system
administrators have access to the UPS hardware and software and tend
to assume a certain "security by obscurity" since many installations
have a configuration as shown in figure <xref target="fig.weak" format="counter"></xref> which uses port nut/3493 between the two Daemons
running in the same system.  The traffic is often not encrypted, and
when encrypted uses deprecated early versions of SSL/TLS.
</t>
<figure anchor="fig.weak">
<name>Common single-system configuration
</name>
<artwork align="center"> ,-----,   ,--------------------,---------------------,
 | UPS |---|  Attachment   &lt;-Commands     Management  |
 |     |===|    Daemon       Responses-&gt;    Daemon    |
 /-----\   '--------------------'---------------------'
              Listens on
             port nut/3493
             for localhost</artwork>
</figure>
<t>This situation is now changing as low cost processors become
available, costing significantly less than a UPS unit.  This evolution
makes it interesting to shift to a configuration as shown in
figure <xref target="fig.weaker" format="counter"></xref>, but it also
exacerbates the security weakness of figure <xref target="fig.weak" format="counter"></xref> since the traffic between the Daemons is now over an
exposed network.
</t>
<figure anchor="fig.weaker">
<name>Integration of UPS and Attachment Daemon
</name>
<artwork align="center"> ,-----,------------,               ,--------------,
 | UPS - Attachment | &lt;-Commands    |  Management  |
 |     |   Daemon   |   Responses-&gt; |    Daemon    |
 /-----'------------\               '--------------'
         Listens on
        port nut/3493</artwork>
</figure>
<t>These security issues raised by UPS management are those of the
power industry in general: they are addressed in detail in
<xref target="IEC62351-1">Technical Specification IEC 62351-1</xref>.
In addition to equipment security, cyber security is now an essential
consideration.
</t>
<t>Quoting from <xref target="IEC62351-1">IEC 62351-1 clause
5.2.3.5</xref>:
</t>
<blockquote> With the computer systems for power operations presumably
kept isolated from the Internet, many utility personnel do not see any
reason for adding security measures to these systems.  However, as
clearly seen from these Subclauses, this may not be true anymore as
networking becomes more prevalent and additional information access
requirements grow.</blockquote>
<t><xref target="IEC62351-1">Clause 5.3.5</xref> lists typical
security attacks: Eavesdropping, Masquerade, Man-in-the-Middle,
Replay, Resource Exhaustion.
RFC3552 <xref target="RFC3552"></xref> adds message insersion /
deletion / modification, and denial of service.
</t>
<t>Let's look more closely at these requirements:
</t>
<ul>
<li>Eavesdropping, see <xref target="Eavesdropping"></xref>
</li>
<li>Man-in-the-Middle, see <xref target="Man-in-the-Middle"></xref>
</li>
<li>Masquerade, see <xref target="Masquerade"></xref>
</li>
<li>Message insersion, deletion, modification,
see <xref target="Messageidm"></xref>
</li>
<li>Replay, see <xref target="Replay"></xref>
</li>
<li>Resource Exhaustion, Denial of Service,
see <xref target="Exhaustion"></xref>
</li>
</ul>
</section>
<section anchor="SecRec">
<name>Communication Security Requirements</name>
<t>Enforcing secure communication requires tightening up the Attachment Daemon to
require the use of command
<tt>STARTTLS</tt> for commands sent over the global Internet.  In such a
situation an Attachment Daemon listening for traffic other than from
the <tt>localhost</tt>:
</t>
<ol indent="adaptive">
<li anchor="should"><bcp14>SHOULD</bcp14> require and accept command
<tt>STARTTLS</tt>,
</li>
<li anchor="must"><bcp14>MUST</bcp14> encrypt all communication with a
Management Daemon,
</li>
<li anchor="shall"><bcp14>SHALL</bcp14> refuse all non-encrypted
commands except an initial <tt>STARTTLS</tt>.
</li>
</ol>
<t>Notes:  
</t>
<ul>
<li anchor="note-should">The <bcp14>SHOULD</bcp14> rather
than <bcp14>MUST</bcp14> in <xref target="should"></xref> above allows
system administrators to enforce secure communication using other
techniques which do not involve the <tt>STARTTLS</tt> command.
</li>
<li>If an Attachment Daemon requires that all commands be encrypted as required by
the <bcp14>MUST</bcp14> in <xref target="must"></xref> above, then
automatically each Management Daemon <bcp14>MUST</bcp14> encrypt as well, since it
has to do so in order to gain access.
</li>
<li>The <bcp14>SHALL</bcp14> in <xref target="shall"></xref> above
applies to traffic from the global Internet.  An
Attachment Daemon <bcp14>MAY</bcp14> accept unencrypted commands
from <tt>localhost</tt> if the local installation's security practices
allow it, for example in a dedicated appliance.
</li>
<li>Note that the separate management of strongly secure traffic from
the global Internet and weakly secure traffic from <tt>localhost</tt>
can be achieved by using two ports: <tt>nut/3493</tt> for the current
weakly secure traffic from <tt>localhost</tt>, and some other port,
perhaps <tt>ups/TBD1</tt>, for enforced secure communication, much in
the manner of <tt>http</tt> and <tt>https</tt>.
</li>
</ul>
<t>Firewalls <bcp14>SHOULD</bcp14> be used to restrict the
communication between the Attachment Daemon and the accepted Management Daemons, prohibiting
and discarding traffic from any systems that are not part of the
envisioned power management setup.  Note:
See <xref target="note-should"></xref> above on the use
of <bcp14>SHOULD</bcp14>.
</t>
</section>
<section anchor="Attacks">
<name>Attacks and Defences</name>
<section anchor="Eavesdropping">
<name>Eavesdropping</name>
<t>The defence against eavesdropping is encryption of the commands and
responses passed between client Management Daemon and server Attachment Daemon.  The protocol
provides command <tt>STARTTLS</tt>, see <xref target="starttls"></xref>, which calls on
the Attachment Daemon to support TLS encryption of the communication.  If this
command is accepted, the Management Daemon also encrypts.
</t>
<t>In current NUT Project practice, the use of TLS is optional,
however a Management Daemon may refuse to accept unencrypted communication.  This
is done by setting declarations <tt>FORCESSL</tt> to 1
and <tt>CERTVERIFY</tt> to 1 in the Management Daemon configuration file.
</t>
<section>
<name>Misplaced declarations requiring TLS</name>
<t>A further weakness is that the <tt>FORCESSL</tt>
and <tt>CERTVERIFY</tt> declarations which enforce use of encryption
are in the client Management Daemon configuration file and not in the Attachment Daemon.
Secure practice requires enforcement by the server Attachment Daemon rather than a
possibly rogue client Management Daemon out on the Internet.
</t>
<t>This weakness may be mitigated with strict firewall rules which
would prevent the rogue client Management Daemon from accessing the Attachment Daemon.
</t>
</section>
<section>
<name>Weak protection in previous version 2.7.4</name>
<t>Although version 2.8.0 of NUT supports TLS
v.3 <xref target="RFC8446"></xref> with X.509 v3 certificates as
defined by RFC5280 <xref target="RFC5280"></xref>, previous version
2.7.4 only supported earlier SSL/TLS versions.  To overcome this
weakness, The following techniques have been used:
</t>
<ul>
<li>Shims, see <xref target="Shims"></xref>
</li>
<li>TLS tunnel, see <xref target="TLStunnel"></xref>
</li>
<li>Virtual Private Network, VPN, see <xref target="VPN"></xref>
</li>
<li>Virtual Local Area network, VLAN, see <xref target="VLAN"></xref>
</li>
</ul>
</section>
</section>
<section anchor="Man-in-the-Middle">
<name>Man in the Middle</name>
<t>The protocol relies on TLS encryption to prevent man-in-the-middle
attacks.  See <xref target="AppendixEavesdropping"></xref> for defense
methods used for previous NUT version 2.7.4.
</t>
</section>
<section anchor="Masquerade">
<name>Masquerade Attack: Agent Verification</name>
<t anchor="AgentVerif">The protocol allows a Management Daemon to send
command <tt>FSD</tt> to an Attachment Daemon to shut down a working system and
it's power supply as described in The Shutdown Story,
see <xref target="shutdownstory"></xref>.  A malicious client acting
as a Management Daemon could turn off the UPS power outlets causing the system to
fail.
</t>
<t>The protocol provides commands <tt>USERNAME</tt>, see <xref target="username"></xref>,
and <tt>PASSWORD</tt>, see <xref target="password"></xref>, which allow an administrative
user in a Management Daemon to authenticate itself to the Attachment Daemon, as a defence
against masquerade attacks.  The administrative user name and password
need protection against local malicious users. This is done by
restricting access to the configuration files.
</t>
</section>
<section anchor="Messageidm">
<name>Message insertion, deletion, modification</name>
<t>The protocol relies on TLS encryption to prevent message insertion,
deletion and modification attacks.
See <xref target="AppendixEavesdropping"></xref> for defense methods
used for previous NUT version 2.7.4.
</t>
</section>
<section anchor="Replay">
<name>Replay</name>
<t>There are two cases:
</t>
<ol indent="adaptive">
<li>The replay is from a system other than an approved Management Daemon:
the protocol relies on a firewall to block the traffic.    
</li>
<li>The replay is from an approved Management Daemon: the protocol relies on the
Management Daemon's own security to prevent unauthorised access.
</li>
</ol>
</section>
<section anchor="Exhaustion">
<name>Denial of Service</name>
<t>The protocol relies on a very tightly specified firewall to prevent
denial of service attacks.  Only designated client Management Daemons should be
able to reach the server Attachment Daemon.
</t>
</section>
</section>
</section>
<section anchor="Codepoint">
<name>Codepoint Management</name>
<t>This document raises five matters of codepoint management:
</t>
<ol indent="adaptive">
<li>The namespaces occupied by the protocol commands described in this
document, see <xref target="commands"></xref>.
</li>
<li>The namespaces occupied by the protocol responses described in
this document, see <xref target="errorresponses"></xref>.
</li>
<li>The namespace occupied by UPS status names,
</li>
<li>The namespace occupied by UPS variable names,
</li>
<li>The port name and port number used to manage UPS units.
</li>
</ol>
<section>
<name>Namespaces used by Commands, Responses, Statuses and Variables</name>
<t>Current NUT Project experience after more than 20 years is that the UPS
management area advances slowly, and that there are few requests to
modify or extend the Commands, Responses, Statuses and Variables.  When
this does occur, the NUT Project has been able to settle the matter
without difficulty in the project mailing list.  It is therefore
proposed to not burden IANA with this namespace management and to
continue with the current process in which the project in its mailing
list acts as a Working Group.
</t>
<t>The Commands, Responses, Statuses and Variables are currently
recorded as follows:
</t>
<table anchor="record">
<name>Project records of namespace allocation
</name>
<thead>
<tr>
<th align="center">Namespace </th>
<th align="center">Recording document </th>
<th align="center">Reference
</th>
</tr>
</thead>
<tbody>
<tr>
<td>Commands and Responses
    </td>
<td>This document
    </td>
<td>Commands, see <xref target="commands"></xref>,
        Responses, see <xref target="responses"></xref>
</td>
</tr>
<tr>
<td>(Idem, historical record)
    </td>
<td>Project Developer Guide Ch 9
    </td>
<td><xref target="devguide">Developer Guide</xref>
</td>
</tr>
<tr>
<td>Statuses
    </td>
<td>This document
    </td>
<td><xref target="symbols"></xref>
</td>
</tr>
<tr>
<td>(Idem, historical record)
    </td>
<td>Source code <tt>clients/status.h</tt>
    </td>
<td><xref target="gitstats">GitHub repository</xref>
</td>
</tr>
<tr>
<td>Variables
    </td>
<td>Source code file <tt>docs/nut-names.txt</tt>
    </td>
<td><xref target="gitvars">GitHub repository</xref>
</td>
</tr>
</tbody>
</table>
</section>
<section>
<name>Port Name and Number used to Manage UPS Units</name>
<t>See the <xref target="Registry">IANA Registry</xref> for the latest
situation.
</t>
<section>
<name>Port <tt>nut/3493</tt></name>
<t>In 2002 IANA assigned port nut/3493 to project lead Russell Kroll,
and updated the assignment to the NUT Project itself in 2020.
</t>
</section>
<section anchor="ups401">
<name>Port <tt>ups/401</tt></name>
<t>In 2008 IANA assigned <tt>ups/401</tt> "Uninterruptible Power
Supply" to Mr.  Charles Bennett as both assignee and contact.  We have
been unable to find any protocol document or other published activity
report for this port other than the One Windows Trojan.  Mr. Bennett
himself died in 2015, see <xref target="Bennett">obituary</xref>.
Since his email address was registered by IANA
as <tt>bennettc@ohio.edu</tt> it is possible that the University of
Ohio is a successor in interest.  The editor tried to contact the IT
support department of the university by email and telephone but was
rejected.
<cref>Ed: My non-contact was Mr. Keith Brock, IT Support Senior
Specialist, brock@ohio.edu +1 740 597 2136</cref>
</t>
</section>
<section anchor="projreq">
<name>NUT Project Requirement</name>
<t>The NUT Project needs to address the the current weak security,
see <xref target="weak"></xref>, of UPS management deployments, for
example
</t>
<ul>
<li>by implementing the "shim" technique
of <xref target="fig.shim"></xref> described
in <xref target="Shims"></xref> for providing secure access to the
Attachment Daemon,
</li>
<li>or by providing a choice of ports through which an Attachment Daemon may
receive commands: one for "legacy" traffic, the other for fully
secured traffic.
</li>
</ul>
<t anchor="secondport">The project needs a second registered port.
Since ports are a limited resource, it would be better to re-use an
existing port rather than request a new one, and the project is
interested in using existing port <tt>ups/TBD1</tt>.  Let's look more
closely at this:
</t>
<ul spacing="compact">
<li>The port name "ups" satisfies the Principle of Least Surprise.  It
is not surprising for a port called "ups" to be used to manage UPSs.
It is unlikely to be used for anything else.
</li>
<li>There are no other known users of this port and no other published
protocols or usage reports.
</li>
<li><t>The currently assigned port number 401 is for a system port.
The project has no imperative need for such a port; a user port, TBD1,
would be sufficient.  The Attachment Daemon is a system activity, but it can be
launched by root and dropped to a non-privileged user perfectly well
on a user port.
</t><t>Note: In Unix-like systems a port with a number below 1024 is
privileged and requires elevated permissions to manage.
</t></li>
<li>System ports are more likely to attract malicious scans than user
ports.
</li>
<li>The project does not need to be assigned this port.  The need is
to be able to use port "ups".
</li>
</ul>
</section>
</section>
</section>
<section>
<name>IANA Considerations</name>
<section anchor="IANA">
<name>Port Name <tt>ups</tt>: Reference to this Document</name>
<t>The NUT Project has a requirement to use a second port, see "NUT
Project Requirement" <xref target="secondport"></xref>, and would like
to use port name <tt>ups</tt> as well as port <tt>nut</tt>.  The
project requests that IANA authorise such use, perhaps by updating
the <xref target="Registry">Service Name and Transport Protocol Port
Number Registry</xref> for ports
<tt>ups</tt> and <tt>nut/3493</tt> to include a reference to this
document.
</t>
<t>UPS management does not need a system port.  If port number 401
were freed and the name <tt>ups</tt> assigned to user port TBD1, that
would be equally effective.
</t>
<t><cref>The document shepherd is requested to replace the port number
TBD1 by any number that IANA assigns to port name
<tt>ups</tt>.</cref>
</t>
</section>
<section anchor="ChangeReg">
<name>Change of Registrant</name>
<t>The NUT Project advises IANA that port <tt>ups/401</tt> has no
effective registrant, see <xref target="ups401"></xref>.  The project
does not have an imperative need to be the registrant but will accept
to become the registrant if IANA deems such change desirable.  Such a
change in registrant could be accompanied by an allocation of a user
port number TBD1.
</t>
</section>
</section>
<section anchor="implementation">
<name>Implementation Status</name>
<t>This section presents a very short summary of the status of the
Network UPS Tools project
</t>
<ul anchor="vsh" spacing="compact">
<li>May 1996: The first hack as a cron job.
</li>
<li>September 1997: The first server-client code.
</li>
<li>March 1998: First public release.
</li>
<li>June 1999: Code rewrite with a UPS driver <tt>smartups</tt>, an
Attachment Daemon <tt>upsd</tt> and a simple Management Daemon.
</li>
<li>September 1999: The project became "Network UPS Tools".  The
Management Daemon <tt>upsmon</tt> supported primary/secondary configurations.
</li>
<li>June 2001: Common core for multiple drivers.
</li>
<li>May 2002: IANA granted port nut/3493. August: release
1.0.0. November: OpenSSL support.
</li>
<li>April 2003: The initial set of command and variable names was
designed.
</li>
<li anchor="arno">February 2005: Arnaud Quette took over the project
lead from Russell Kroll.
</li>
<li>March 2016: Version 2.7.4 released, supported over 100 device
manufacturers and hundreds of UPS models.
</li>
<li>November 2020: Evgeny "Jim" Klimov took over project lead from
Arnaud Quette.
</li>
<li>March 2022: Version 2.8.0 released, supporting protocol version
1.3.
</li>
</ul>
<t>See <xref target="githist"></xref>
and <xref target="History"></xref> for a detailed history of the
NUT Project.
</t>
<section>
<name>Inclusion in Software Distributions</name>
<t>The programs <tt>upsd</tt>, <tt>upsmon</tt>, <tt>upssched</tt>,
<tt>upsc</tt>, <tt>upscmd</tt> and <tt>upsrw</tt> have been included
in the package known as "nut" in the package systems of many
distributions: all the major Linux distributions, and Unix
distributions such as OpenBSD and OpenSolaris.  A Microsoft Windows
version has been developed but was not maintained.
</t>
</section>
<section anchor="MinSup">
<name>Recommended Minimum Support</name>
<t>The features provided by current UPS units vary widely.  However
experience shows that a minimum feature set is needed for satisfactory
use of the NUT Project software.  A full list of variables is
available in <xref target="gitvars">source code file
docs/nut-names.txt</xref> which serves as the Recording Document.
</t>
<section anchor="MinSupPC">
<name>Desktop PC Variables</name>
<t>The following variables form a minimum set suitable for Desktop PC.
It is expected that on public power supply failure, the PC will be halted.  It
will not restart automatically when power returns.
</t>
<ul>
<li><tt>battery.charge</tt>
</li>
<li><tt>battery.charge.low</tt>
</li>
<li><tt>device.mfr</tt>
</li>
<li><tt>device.model</tt>
</li>
<li><tt>ups.status</tt> with the minimum status symbol set <tt>OL</tt> <tt>OB</tt>
<tt>LB</tt> <tt>FSD</tt>, see <xref target="symbols"></xref>.
</li>
</ul>
</section>
<section anchor="MinSupServer">
<name>Unattended Servers, Additional Variables</name>
<t>The following additional variables are needed in a minimum set
suitable for an unattended server.  It is expected that on public power supply
failure, the server will be halted.  It will restart automatically
when power returns.
</t>
<ul>
<li><tt>battery.date</tt>
</li>
<li><tt>device.serial</tt>
</li>
<li><tt>ups.delay.shutdown</tt>
</li>
<li><tt>ups.delay.start</tt>
</li>
</ul>
</section>
<section anchor="MinSupCommands">
<name>Commands and other Technical
Terms</name>
<t>Satisfactory use of the NUT Project software requires support for
all the commands specified in protocol version 1.3, software version
2.8.0.  The software should also support the technical terms used in
protocol version 1.2, software version 2.7.4.
See <xref target="differences"></xref> for the differences.
</t>
</section>
</section>
</section>
<section anchor="Ack">
<name>Acknowledgments</name>
<t>This document is based on the
NUT Project <xref target="devguide">documentation</xref>. The editor
acknowledges the work of Charles Lepple, Arjen de Korte, Arnaud
Quette, Jim Klimov, Russell Kroll, Manuel Wolfshant, Greg Troxel, Mark
Hansen and many others who contribute to
the <xref target="nut-upsuser">nut-upsuser</xref>.
and <xref target="nut-upsdev">nut-upsdev</xref> mailing lists.
</t>
<t>The source for this document is marked up using
an <xref target="SGML">SGML DTD</xref> and an XML meta-DTD as defined
by
<xref target="HyTimeA">HyTime Annex A</xref>.  Unlike XML, SGML offers
markup minimisation, and the source document takes advantage of this.
The <xref target="sgmlnorm"><tt>osgmlnorm</tt></xref> program generates
XML which program <xref target="RFC7991"><tt>xml2rfc</tt></xref> uses
to prepare the HTML and text renderings.  The editor acknowledges the
help received from Carsten Bormann and Julian Reschke in the xml2rfc
mailing list.
</t>
<t>The editor thanks the Independent Submissions Editors Adrian Farrel
and Eliot Lear for advice received during the preparation of this
document.  Many helpful comments were received from Bart Smit, David
Zomaya, Joyce Norris, Ted Mittelstaedt and Manuel Wolfshant.
</t>
</section>
</middle>
<back>
<references>
<name>Normative References
  </name>
<reference xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml" anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title>
<seriesInfo name="DOI" value="10.17487/RFC2119"/>
<seriesInfo name="RFC" value="2119"/>
<seriesInfo name="BCP" value="14"/>
<author initials="S." surname="Bradner" fullname="S. Bradner">
</author>
<date month="March" year="1997">
      </date>
<abstract>
<t>In many standards track documents several words are used
        to signify the requirements in the specification.  These
        words are often capitalized. This document defines these
        words as they should be interpreted in IETF documents.  This
        document specifies an Internet Best Current Practices for
        the Internet Community, and requests discussion and
        suggestions for improvements.
      </t>
</abstract>
</front>
</reference>
<reference anchor="RFC5198" target="https://www.rfc-editor.org/info/rfc5198">
<front>
<title>Unicode Format for Network Interchange</title>
<author initials="J." surname="Klensin" fullname="J. Klensin">
</author>
<author initials="M." surname="Padlipsky" fullname="M. Padlipsky">
</author>
<date month="March" year="2008">
      </date>
<abstract>
<t>The Internet today is in need of a standardized form for
        the transmission of internationalized "text" information,
        paralleling the specifications for the use of ASCII that date
        from the early days of the ARPANET. This document specifies
        that format, using UTF-8 with normalization and specific
        line-ending sequences. [STANDARDS-TRACK]
      </t>
</abstract>
</front>
<seriesInfo name="RFC" value="5198"/>
<seriesInfo name="DOI" value="10.17487/RFC5198"/>
</reference>
<reference anchor="RFC5234" target="https://www.rfc-editor.org/info/rfc5234">
<front>
<title>Augmented BNF for Syntax Specifications: ABNF</title>
<author initials="D." surname="Crocker" fullname="D. Crocker" role="editor">
</author>
<author initials="P." surname="Overell" fullname="P. Overell">
</author>
<date month="January" year="2008">
      </date>
<abstract>
<t>Internet technical specifications often need to define a
        formal syntax. Over the years, a modified version of
        Backus-Naur Form (BNF), called Augmented BNF (ABNF), has been
        popular among many Internet specifications. The current
        specification documents ABNF. It balances compactness and
        simplicity with reasonable representational power. The
        differences between standard BNF and ABNF involve naming
        rules, repetition, alternatives, order-independence, and value
        ranges. This specification also supplies additional rule
        definitions and encoding for a core lexical analyzer of the
        type common to several Internet
        specifications. [STANDARDS-TRACK]
      </t>
</abstract>
</front>
<seriesInfo name="STD" value="68"/>
<seriesInfo name="RFC" value="5234"/>
<seriesInfo name="DOI" value="10.17487/RFC5234"/>
</reference>
<reference anchor="RFC7405" target="https://www.rfc-editor.org/info/rfc7405">
<front>
<title>Case-Sensitive String Support in ABNF</title>
<author initials="P." surname="Kyzivat" fullname="P. Kyzivat">
</author>
<date month="December" year="2014"></date>
<abstract>
<t>This document extends the base definition of ABNF
          (Augmented Backus-Naur Form) to include a way to specify
          US-ASCII string literals that are matched in a
          case-sensitive manner.
        </t>
</abstract>
</front>
<seriesInfo name="RFC" value="7405"/>
<seriesInfo name="DOI" value="10.17487/RFC7405"/>
</reference>
<reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
<front>
<title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
<author initials="B." surname="Leiba" fullname="B. Leiba">
</author>
<date month="May" year="2017">
      </date>
<abstract>
<t>RFC 2119 specifies common key words that may be used in protocol
        specifications. This document aims to reduce the ambiguity by
        clarifying that only UPPERCASE usage of the key words have the
        defined special meanings.
      </t>
</abstract>
</front>
<seriesInfo name="BCP" value="14"/>
<seriesInfo name="RFC" value="8174"/>
<seriesInfo name="DOI" value="10.17487/RFC8174"/>
</reference>
<reference anchor="ISOIEC10646">
<front>
<title>ISO/IEC 10646:2020
             Information technology - Universal coded character set (UCS)
      </title>
<author>
<organization>
      </organization>
</author>
<date month="December" year="2020">
    </date>
</front>
<seriesInfo name="ISO/IEC" value="Internatioanl Standard ISO/IEC 10646:2020(E), 2804 pages"/>
<seriesInfo name="CHF" value="195"/>
<seriesInfo name="Technical Committee" value="JTC1/SC2 Coded character sets"/>
</reference>
</references>
<references>
<name>Informative References
  </name>
<reference anchor="RFC3552" target="https://www.rfc-editor.org/info/rfc3552">
<front>
<title>Guidelines for Writing RFC Text on Security Considerations</title>
<author initials="E." surname="Rescorla" fullname="E. Rescorla">
</author>
<author initials="B." surname="Korver" fullname="B. Korver">
</author>
<date month="July" year="2003">
    </date>
<abstract>
<t>All RFCs are required to have a Security
    Considerations section. Historically, such sections have been
    relatively weak. This document provides guidelines to RFC authors
    on how to write a good Security Considerations section. This
    document specifies an Internet Best Current Practices for the
    Internet Community, and requests discussion and suggestions for
    improvements.
    </t>
</abstract>
</front>
<seriesInfo name="BCP" value="72"/>
<seriesInfo name="RFC" value="3552"/>
<seriesInfo name="DOI" value="10.17487/RFC3552"/>
</reference>
<reference xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7991.xml" anchor="RFC7991" target="https://www.rfc-editor.org/info/rfc7991">
<front>
<title>The "xml2rfc" Version 3 Vocabulary</title>
<seriesInfo name="RFC" value="7991"/>
<author initials="P." surname="Hoffman" fullname="P. Hoffman">
</author>
<date month="December" year="2016">
    </date>
</front>
</reference>
<reference anchor="RFC5280" target="https://www.rfc-editor.org/info/rfc5280">
<front>
<title>
   Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile
   </title>
<author initials="D." surname="Cooper" fullname="D. Cooper">
</author>
<author initials="S." surname="Santesson" fullname="S. Santesson">
</author>
<author initials="S." surname="Farrell" fullname="S. Farrell">
</author>
<author initials="S." surname="Boeyen" fullname="S. Boeyen">
</author>
<author initials="R." surname="Housley" fullname="R. Housley">
</author>
<author initials="W." surname="Polk" fullname="W. Polk">
</author>
<date month="May" year="2008">
   </date>
<abstract>
<t>This memo profiles the X.509 v3 certificate and X.509
   v2 certificate revocation list (CRL) for use in the Internet. An
   overview of this approach and model is provided as an
   introduction. The X.509 v3 certificate format is described in
   detail, with additional information regarding the format and
   semantics of Internet name forms. Standard certificate extensions
   are described and two Internet-specific extensions are defined. A
   set of required certificate extensions is specified. The X.509 v2
   CRL format is described in detail along with standard and
   Internet-specific extensions. An algorithm for X.509 certification
   path validation is described. An ASN.1 module and examples are
   provided in the appendices. [STANDARDS-TRACK]
   </t>
</abstract>
</front>
<seriesInfo name="RFC" value="5280"/>
<seriesInfo name="DOI" value="10.17487/RFC5280"/>
</reference>
<reference anchor="RFC7942" target="https://www.rfc-editor.org/info/rfc7942">
<front>
<title>Improving Awareness of Running Code: The Implementation Status Section</title>
<author initials="Y." surname="Sheffer" fullname="Y. Sheffer">
</author>
<author initials="A." surname="Farrel" fullname="A. Farrel">
</author>
<date month="July" year="2016">
  </date>
<abstract>
<t>This document describes a simple process that allows
  authors of Internet-Drafts to record the status of known
  implementations by including an Implementation Status section.  This
  will allow reviewers and working groups to assign due consideration
  to documents that have the benefit of running code, which may serve
  as evidence of valuable experimentation and feedback that have made
  the implemented protocols more mature.
  </t>
<t>This process is not mandatory.  Authors of Internet-Drafts are
  encouraged to consider using the process for their documents, and
  working groups are invited to think about applying the process to
  all of their protocol specifications.  This document obsoletes RFC
  6982, advancing it to a Best Current Practice.</t>
</abstract>
</front>
<seriesInfo name="BCP" value="205"/>
<seriesInfo name="RFC" value="7942"/>
<seriesInfo name="DOI" value="10.17487/RFC7942"/>
</reference>
<reference anchor="RFC8446" target="https://www.rfc-editor.org/info/rfc8446">
<front>
<title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
<author initials="E." surname="Rescorla" fullname="E. Rescorla">
</author>
<date month="August" year="2018">
  </date>
<abstract>
<t>This document specifies version 1.3 of the Transport
  Layer Security (TLS) protocol.  TLS allows client/server
  applications to communicate over the Internet in a way that is
  designed to prevent eavesdropping, tampering, and message
  forgery.</t>
<t>This document updates RFCs 5705 and 6066, and
  obsoletes RFCs 5077, 5246, and 6961.  This document also specifies
  new requirements for TLS 1.2 implementations.</t>
</abstract>
</front>
<seriesInfo name="RFC" value="8446"/>
<seriesInfo name="DOI" value="10.17487/RFC8446"/>
</reference>
<reference anchor="IEC62351-1" target="https://nanopdf.com/download/technical-iec-specification-ts-62351-1_pdf">
<front>
<title>IEC TS 62351-1 Power systems management and associated
    information exchange -- Data and communications security.  Part 1:
    Communication network and system security -- Introduction to
    security issues</title>
<author>
</author>
<date day="15" month="May" year="2007">
  </date>
<abstract>
<t>Provides an introduction to the remaining parts of the
    IEC 62351 series, primarily to introduce the reader to various
    aspects of information security as applied to power system
    operations.</t>
</abstract>
</front>
<seriesInfo name="IEC" value="Technical Specification Reference number IEC/TS 62351-1:2007(E), 35 pages"/>
<seriesInfo name="CHF" value="205"/>
<seriesInfo name="Technical Committee" value="TC 57 - Power systems management and associated information exchange"/>
</reference>
<reference anchor="NUT" target="https://www.networkupstools.org">
<front>
<title>Network UPS Tools (NUT) Project</title>
<author>
<organization>
    </organization>
</author>
</front>
</reference>
<reference anchor="nut-upsuser" target="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser">
<front>
<title>Network UPS Tools (NUT) Project Mailing List for users</title>
<author>
<organization>
    </organization>
</author>
</front>
</reference>
<reference anchor="nut-upsdev" target="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev">
<front>
<title>Network UPS Tools (NUT) Project Mailing List for developers</title>
<author>
<organization>
    </organization>
</author>
</front>
</reference>
<reference anchor="nut-repository" target="https://github.com/networkupstools/nut/">
<front>
<title>GitHub Repository for the Network UPS Tools (NUT) Project</title>
<author>
<organization>
    </organization>
</author>
</front>
</reference>
<reference anchor="devguide" target="https://networkupstools.org/docs/developer-guide.chunked/ar01s09.html">
<front>
<title>Network UPS Tools (NUT) Project Developer Guide</title>
<author>
<organization>
    </organization>
</author>
</front>
</reference>
<reference anchor="SGML">
<front>
<title>The SGML Handbook</title>
<seriesInfo name="ISBN" value="0-19-853737-9"/>
<author initials="Charles F." surname="Goldfarb" fullname="Charles F. Goldfarb">
<organization>Oxford University Press
      </organization>
</author>
<date year="1990">
    </date>
</front>
</reference>
<reference anchor="HyTimeA">
<front>
<title>International Standard ISO/IEC 10744 --
      Hypermedia/Time-based Structuring Language, Annex A, SGML
      Extended Facilities</title>
<seriesInfo name="ISO/IEC" value="JTC 1/SC 34  Document description and processing languages"/>
<author>
<organization>
      </organization>
</author>
<date year="1997">
    </date>
</front>
</reference>
<reference anchor="sgmlnorm" target="http://www.jclark.com/sp/sgmlnorm.htm">
<front>
<title>SGMLNORM An SGML System Conforming to International
             Standard ISO 8879 -- Standard Generalized Markup
             Language</title>
<author initials="James" surname="Clark" fullname="James Clark">
<organization>
    </organization>
</author>
</front>
</reference>
<reference anchor="Registry" target="https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml">
<front>
<title>Service Name and Transport Protocol Port Number Registry</title>
<seriesInfo name="Publisher:" value="IANA"/>
<author>
</author>
</front>
</reference>
<reference anchor="Bennett" target="https://www.legacy.com/obituaries/name/charles-bennett-obituary?pid=174356861">
<front>
<title>Charles Bennett Obituary</title>
<seriesInfo name="Publisher:" value="Jagers and Sons Funeral Home, 24 Morris Ave., Athens OH"/>
<author>
</author>
</front>
</reference>
<reference anchor="Library" target="https://networkupstools.org/ddl/">
<front>
<title>GitHub Network UPS Tools, Devices  Dumps Library</title>
<author>
</author>
</front>
</reference>
<reference anchor="History" target="https://networkupstools.org/docs/user-manual.pdf">
<front>
<title>Network UPS Tools User Manual, Appendix J Project history</title>
<author>
</author>
</front>
</reference>
<reference anchor="Documentation" target="https://networkupstools.org/documentation.html">
<front>
<title>Network UPS Tools Documentation</title>
<author>
</author>
</front>
</reference>
<reference anchor="gitvars" target="https://github.com/networkupstools/nut/blob/master/docs/nut-names.txt">
<front>
<title>GitHub Network UPS Tools code repository, variable names</title>
<author>
</author>
</front>
</reference>
<reference anchor="gitstats" target="https://github.com/networkupstools/nut/blob/master/clients/status.h">
<front>
<title>GitHub Network UPS Tools code repository, status names</title>
<author>
</author>
</front>
</reference>
<reference anchor="githist" target="https://github.com/networkupstools/nut/blob/master/docs/history.txt">
<front>
<title>GitHub Network UPS Tools code repository, project history</title>
<author>
</author>
</front>
</reference>
<reference anchor="stunnel" target="https://www.stunnel.org/">
<front>
<title>Stunnel proxy adds TLS encryption functionality to existing clients and servers</title>
<author initials="Michal" surname="Trojnara" fullname="Michal Trojnara">
</author>
</front>
</reference>
</references>
<section anchor="Annex1">
<name>Variables</name>
<t>The UPS variables represent the abstracted state of the UPS unit.
Certain variables represent not only the state of some hardware
feature, but also provide tunable values and instant commands,
see <xref target="IC"></xref>.  The full set of variables is recorded
in the <xref target="gitvars">reference document for variable
names</xref>.
</t>
<t>The number of variables used in a given deployment depends on the
sophistication of the UPS product: this annex shows a typical example
of the subset of variables used for a reasonably complete "consumer
grade" UPS.  The NUT Project maintains a <xref target="Library">large
library of the variable subsets</xref> used by different UPS models.
</t>
<t>Note that successive versions of a given product may add or delete
features causing a change in the subset of variables used.  An example
is the removal of <tt>ups.delay.start</tt> from a "consumer grade"
UPS.  The manufacturer reserves the feature for the "professional"
product.
</t>
<t>An implementation of a Management Daemon acting as a utility program may
provide a listing of the variables available for a given product, for
example utility program <tt>upsc</tt> as included in the NUT package,
see <xref target="util"></xref>.
</t>
<t>The following sections illustrate the use of variables by taking
the values associated with a typical product example of a 1600Va 1000W
UPS.
</t>
<section>
<name>Typical UPS Variables</name>
<table anchor="typvar">
<name>Typical UPS Variables
</name>
<thead>
<tr>
<th align="center">Variable </th>
<th align="center">Typical value </th>
<th align="center">Default description
</th>
</tr>
</thead>
<tbody>
<tr>
<td><tt>battery.charge</tt> </td>
<td><tt>100</tt> </td>
<td>"Battery charge (percent of full)"
</td>
</tr>
<tr>
<td><tt>battery.charge.low</tt> </td>
<td><tt>20</tt> </td>
<td>"Remaining battery level when UPS switches to LB (percent)"
</td>
</tr>
<tr>
<td><tt>battery.runtime</tt> </td>
<td><tt>1481</tt> </td>
<td>"Battery runtime (seconds)"
</td>
</tr>
<tr>
<td><tt>battery.type</tt> </td>
<td><tt>PbAc</tt> </td>
<td>"Battery chemistry"
</td>
</tr>
<tr>
<td><tt>device.mfr</tt> </td>
<td><tt>Example Mfg</tt> </td>
<td>""
</td>
</tr>
<tr>
<td><tt>device.model</tt> </td>
<td><tt>Economy 1600</tt> </td>
<td>""
</td>
</tr>
<tr>
<td><tt>device.serial</tt> </td>
<td><tt>1234567890</tt> </td>
<td>""
</td>
</tr>
<tr>
<td><tt>device.type</tt> </td>
<td><tt>ups</tt> </td>
<td>""
</td>
</tr>
<tr>
<td><tt>driver.name</tt> </td>
<td><tt>usbhid-ups</tt> </td>
<td>"Driver name"
</td>
</tr>
<tr>
<td><tt>driver.parameter.lowbatt</tt> </td>
<td><tt>37</tt> </td>
<td>"Driver parameter: &lt;name&gt;"
</td>
</tr>
<tr>
<td><tt>driver.parameter.offdelay</tt> </td>
<td><tt>30</tt> </td>
<td>"Driver parameter: &lt;name&gt;"
</td>
</tr>
<tr>
<td><tt>driver.parameter.ondelay</tt> </td>
<td><tt>40</tt> </td>
<td>"Driver parameter: &lt;name&gt;"
</td>
</tr>
<tr>
<td><tt>driver.parameter.pollfreq</tt> </td>
<td><tt>30</tt> </td>
<td>"Driver parameter: &lt;name&gt;"
</td>
</tr>
<tr>
<td><tt>driver.parameter.pollinterval</tt> </td>
<td><tt>2</tt> </td>
<td>"Driver parameter: &lt;name&gt;"
</td>
</tr>
<tr>
<td><tt>driver.parameter.port</tt> </td>
<td><tt>auto</tt> </td>
<td>"Driver parameter: &lt;name&gt;"
</td>
</tr>
<tr>
<td><tt>driver.parameter.synchronous</tt> </td>
<td><tt>no</tt> </td>
<td>"Driver parameter: &lt;name&gt;"
</td>
</tr>
<tr>
<td><tt>driver.parameter.vendorid</tt> </td>
<td><tt>0999</tt> </td>
<td>"Driver parameter: &lt;name&gt;"
</td>
</tr>
<tr>
<td><tt>driver.version</tt> </td>
<td><tt>2.8.0</tt> </td>
<td>"Driver version - NUT release"
</td>
</tr>
<tr>
<td><tt>driver.version.data</tt> </td>
<td><tt>HID 1.39</tt> </td>
<td>""
</td>
</tr>
<tr>
<td><tt>driver.version.internal</tt> </td>
<td><tt>0.41</tt> </td>
<td>"Internal driver version"
</td>
</tr>
<tr>
<td><tt>input.transfer.high</tt> </td>
<td><tt>264</tt> </td>
<td>"High voltage transfer point (V)"
</td>
</tr>
<tr>
<td><tt>input.transfer.low</tt> </td>
<td><tt>184</tt> </td>
<td>"Low voltage transfer point (V)"
</td>
</tr>
<tr>
<td><tt>outlet.1.desc</tt> </td>
<td><tt>PowerShare Outlet 1</tt> </td>
<td>"Outlet description"
</td>
</tr>
<tr>
<td><tt>outlet.1.id</tt> </td>
<td><tt>2</tt> </td>
<td>"Outlet system identifier"
</td>
</tr>
<tr>
<td><tt>outlet.1.status</tt> </td>
<td><tt>on</tt> </td>
<td>"Outlet switch status"
</td>
</tr>
<tr>
<td><tt>outlet.1.switchable</tt> </td>
<td><tt>no</tt> </td>
<td>"Outlet switch ability"
</td>
</tr>
<tr>
<td><tt>outlet.2.desc</tt> </td>
<td><tt>PowerShare Outlet 2</tt> </td>
<td>"Outlet description"
</td>
</tr>
<tr>
<td><tt>outlet.2.id</tt> </td>
<td><tt>3</tt> </td>
<td>"Outlet system identifier"
</td>
</tr>
<tr>
<td><tt>outlet.2.status</tt> </td>
<td><tt>on</tt> </td>
<td>"Outlet switch status"
</td>
</tr>
<tr>
<td><tt>outlet.2.switchable</tt> </td>
<td><tt>no</tt> </td>
<td>"Outlet switch ability"
</td>
</tr>
<tr>
<td><tt>outlet.desc</tt> </td>
<td><tt>Main Outlet</tt> </td>
<td>"Outlet description"
</td>
</tr>
<tr>
<td><tt>outlet.id</tt> </td>
<td><tt>1</tt> </td>
<td>"Outlet system identifier"
</td>
</tr>
<tr>
<td><tt>outlet.power</tt> </td>
<td><tt>25</tt> </td>
<td>""
</td>
</tr>
<tr>
<td><tt>outlet.switchable</tt> </td>
<td><tt>no</tt> </td>
<td>"Outlet switch ability"
</td>
</tr>
<tr>
<td><tt>output.frequency.nominal</tt> </td>
<td><tt>50</tt> </td>
<td>"Nominal output frequency (Hz)"
</td>
</tr>
<tr>
<td><tt>output.voltage</tt> </td>
<td><tt>230.0</tt> </td>
<td>"Output voltage (V)"
</td>
</tr>
<tr>
<td><tt>output.voltage.nominal</tt> </td>
<td><tt>230</tt> </td>
<td>"Nominal output voltage (V)"
</td>
</tr>
<tr>
<td><tt>ups.beeper.status</tt> </td>
<td><tt>enabled</tt> </td>
<td>"UPS beeper status"
</td>
</tr>
<tr>
<td><tt>ups.delay.shutdown</tt> </td>
<td><tt>20</tt> </td>
<td>"Interval to wait after shutdown with delay command (seconds)"
</td>
</tr>
<tr>
<td><tt>ups.delay.start</tt> </td>
<td><tt>30</tt> </td>
<td>"Interval to wait before (re)starting the load (seconds)"
</td>
</tr>
<tr>
<td><tt>ups.firmware</tt> </td>
<td><tt>02</tt> </td>
<td>"UPS firmware"
</td>
</tr>
<tr>
<td><tt>ups.load</tt> </td>
<td><tt>20</tt> </td>
<td>"Load on UPS (percent of full)"
</td>
</tr>
<tr>
<td><tt>ups.mfr</tt> </td>
<td><tt>Example Mfg</tt> </td>
<td>"UPS manufacturer"
</td>
</tr>
<tr>
<td><tt>ups.model</tt> </td>
<td><tt>Economy 1600</tt> </td>
<td>"UPS model"
</td>
</tr>
<tr>
<td><tt>ups.power.nominal</tt> </td>
<td><tt>1600</tt> </td>
<td>"UPS power rating (VA)"
</td>
</tr>
<tr>
<td><tt>ups.productid</tt> </td>
<td><tt>ffff</tt> </td>
<td>"Product ID for USB devices"
</td>
</tr>
<tr>
<td><tt>ups.serial</tt> </td>
<td><tt>000000000</tt> </td>
<td>"UPS serial number"
</td>
</tr>
<tr>
<td><tt>ups.status</tt> </td>
<td><tt>OL</tt> </td>
<td>"UPS status"
</td>
</tr>
<tr>
<td><tt>ups.temperature</tt> </td>
<td><tt>27</tt> </td>
<td>"UPS temperature (C)"
</td>
</tr>
<tr>
<td><tt>ups.timer.shutdown</tt> </td>
<td><tt>0</tt> </td>
<td>"Time before the load will be shutdown (seconds)"
</td>
</tr>
<tr>
<td><tt>ups.timer.start</tt> </td>
<td><tt>0</tt> </td>
<td>"Time before the load will be started (seconds)"
</td>
</tr>
<tr>
<td><tt>ups.vendorid</tt> </td>
<td><tt>0999</tt> </td>
<td>"Vendor ID for USB devices"
</td>
</tr>
</tbody>
</table>
</section>
<section anchor="rw">
<name>Typical UPS Readable and Writable Variables</name>
<t>Some of the features of a UPS are represented by variables which
may be tuned by the user.  The following variables are typical of such
tunable features.  The precise list depends on the model of UPS.  An
implementation of a Management Daemon acting as a utility program may provide a
listing of the variables available, as well as acting on them, for
example utility program <tt>upsrw</tt> as included in the NUT package,
see <xref target="util"></xref>.
</t>
<table>
<name>Typical readable and writable UPS Variables
</name>
<thead>
<tr>
<th align="center">Variable </th>
<th align="center">Typical value
    </th>
<th align="center">Default description provided as response to the command <tt>GET DESC</tt>
</th>
</tr>
</thead>
<tbody>
<tr>
<td><tt>battery.charge.low</tt> </td>
<td><tt>20</tt> </td>
<td><tt>"Remaining battery level when UPS switches to LB (percent)"</tt>
</td>
</tr>
<tr>
<td><tt>input.transfer.high</tt> </td>
<td><tt>264</tt> </td>
<td><tt>"High voltage transfer point (V)"</tt>
</td>
</tr>
<tr>
<td><tt>input.transfer.low</tt> </td>
<td><tt>184</tt> </td>
<td><tt>"Low voltage transfer point (V)"</tt>
</td>
</tr>
<tr>
<td><tt>outlet.1.desc</tt> </td>
<td><tt>PowerShare Outlet 1</tt> </td>
<td><tt>"Outlet description"</tt>
</td>
</tr>
<tr>
<td><tt>outlet.2.desc</tt> </td>
<td><tt>PowerShare Outlet 2</tt> </td>
<td><tt>"Outlet description"</tt>
</td>
</tr>
<tr>
<td><tt>outlet.2.switchable</tt> </td>
<td><tt>no</tt> </td>
<td><tt>"Outlet switch ability"</tt>
</td>
</tr>
<tr>
<td><tt>outlet.desc</tt> </td>
<td><tt>Main Outlet</tt> </td>
<td><tt>"Outlet description"</tt>
</td>
</tr>
<tr>
<td><tt>outlet.power</tt> </td>
<td><tt>25</tt> </td>
<td><tt>"Description unavailable"</tt>
</td>
</tr>
<tr>
<td><tt>output.voltage.nominal</tt> </td>
<td><tt>230</tt> </td>
<td><tt>"Nominal output voltage (V)"</tt>
</td>
</tr>
<tr>
<td><tt>ups.delay.shutdown</tt> </td>
<td><tt>20</tt> </td>
<td><tt>"Interval to wait after shutdown with delay command (seconds)"</tt>
</td>
</tr>
<tr>
<td><tt>ups.delay.start</tt> </td>
<td><tt>30</tt> </td>
<td><tt>"Interval to wait before (re)starting the load (seconds)"</tt>
</td>
</tr>
</tbody>
</table>
</section>
<section anchor="instcmdexamples">
<name>Typical UPS Instant Commands</name>
<t>Some of the features of a UPS are actions known as instant
commands, see <xref target="IC"></xref>, which may be ordered by the
user.  The following variables represent such instant commands.  The
precise list depends on the model of UPS.  An implementation of a
Management Daemon acting as a utility program may provide a listing of the
variables available, as well as acting on them, for example utility
program <tt>upscmd</tt> as included in the NUT package,
see <xref target="util"></xref>.
</t>
<table>
<name>Typical Instant Commands
</name>
<thead>
<tr>
<th align="center">Command </th>
<th align="center">Meaning
</th>
</tr>
</thead>
<tbody>
<tr>
<td><tt>beeper.disable</tt> </td>
<td>Disable the UPS beeper
</td>
</tr>
<tr>
<td><tt>beeper.enable</tt> </td>
<td>Enable the UPS beeper
</td>
</tr>
<tr>
<td><tt>beeper.mute</tt> </td>
<td>Temporarily mute the UPS beeper
</td>
</tr>
<tr>
<td><tt>load.off</tt> </td>
<td>Turn off the load immediately
</td>
</tr>
<tr>
<td><tt>load.off.delay</tt> </td>
<td>Turn off the load with a delay (seconds)
</td>
</tr>
<tr>
<td><tt>load.on</tt> </td>
<td>Turn on the load immediately
</td>
</tr>
<tr>
<td><tt>load.on.delay</tt> </td>
<td>Turn on the load with a delay (seconds)
</td>
</tr>
<tr>
<td><tt>shutdown.return</tt> </td>
<td>Turn off the load and return when power is back
</td>
</tr>
<tr>
<td><tt>shutdown.stayoff</tt> </td>
<td>Turn off the load and remain off
</td>
</tr>
<tr>
<td><tt>shutdown.stop</tt> </td>
<td>Stop a shutdown in progress
</td>
</tr>
</tbody>
</table>
</section>
</section>
<section anchor="shutdownstory">
<name>The Shutdown Story for System and UPS</name>
<t>This appendix provides background material helpful for a general
understanding of the relation between system and UPS.  It does not
define any feature of the command-response protocol.
</t>
<t>We consider the steps involved in the shutdown and restart of a
long-running unattended server protected by a single UPS.  The Management Daemon
runs in the server as shown in <xref target="fig.story"></xref>.
</t>
<figure anchor="fig.story">
<name>Long-running unattended server
</name>
<artwork align="center">	   ,------------------SERVER------------------,
	   |                    |                     |
 ,-----,   |     UPS       &lt;-Commands        UPS      |
 | UPS |---|  Attachment        |         Management  |
 |     |===|    Daemon       Responses-&gt;    Daemon    |
 /-----\   '--------------------'---------------------'
                             Internal
                             loopback</artwork>
</figure>
<ol indent="adaptive">
<li anchor="start"><em>The public power supply is on</em> -- The system runs
normally. Every 5 seconds, variable <tt>ups.status</tt> reports
<tt>OL</tt>. -- <em>Days, weeks, months go by...</em>
</li>
<li><em>Winter storm. Tree falls on power lines. The public power supply fails</em>
-- The server remains operational running on the UPS battery. The
Management Daemon polls the Attachment Daemon, and detects status change <tt>OL</tt>-&gt;<tt>OB</tt>.
</li>
<li>The Management Daemon logs warning messages. The server is still operational
running on the UPS battery. -- <em>Minutes go by...</em>
</li>
<li>The battery discharges below the level specified by variable
<tt>battery.charge.low</tt>. The server remains operational, but the
UPS battery will not last much longer.  The Management Daemon polls the Attachment Daemon, and
detects status change <tt>OB</tt>-&gt;<tt>OB</tt>+<tt>LB</tt>.
</li>
<li>The Management Daemon logs the low battery event.
</li>
<li anchor="setFSD">The Management Daemon decides to call for a system shutdown.
It sets status <tt>FSD</tt> in the Attachment Daemon to call on any secondaries to
shut down and waits for command <tt>GET NUMATTACH</tt> to report one
single attachment, i.e. the Primary itself. The Management Daemon then issues the
system shutdown command for itself.
</li>
<li anchor="upsdrvctl">The operating system's shutdown process takes
over. During the system shutdown, a NUT Project specific script or an
equivalent systemd service unit runs the command <tt>upsdrvctl
shutdown</tt>. This tells the UPS that it is to shut down N seconds
later where the default is N=20.
Note that the "shutdown" of a UPS removes power
from the outlet sockets, but may not turn the UPS off completely.
A delayed shutdown is sometimes audible, and the characteristic
beeping of the UPS stops.
</li>
<li>The system shuts down and powers down, hopefully before the N=20
seconds have passed.
</li>
<li anchor="UPSshutdown"><t><em>N seconds after
item <xref target="upsdrvctl" format="counter"></xref></em> -- The UPS shuts
down, i.e., it turns off its outlet sockets when N=20 seconds have
passed. With some UPS units, there is an audible "clunk".
</t><t>What if the public power supply returns before the UPS shuts down? The UPS unit
should be able to wait a configurable time with default 30 seconds.
These two timers start from the moment the UPS receives the
<tt>upsdrvctl shutdown</tt> command. -- <em>Minutes, hours, days go
by...</em>
</t></li>
<li><em>Some time later, maybe much later, the public power supply returns</em> --
The UPS reconnects it's outlets to send power to the protected system.
</li>
<li anchor="UPSrestart">The system BIOS option "Restore power on AC
return" or "Restore to previous state" has hopefully been selected and
the system powers up. The bootstrap process of the operating system
begins.
</li>
<li>The operating system starts the Attachment Daemon and the Management Daemon. The Attachment Daemon
starts the Driver and scans the UPS. The UPS status becomes
<tt>OL</tt>+<tt>LB</tt>.
</li>
<li>After some time, the battery charges above
the <tt>battery.charge.low</tt> threshold and the Attachment Daemon declares the
status change <tt>OL</tt>+<tt>LB</tt>-&gt;<tt>OL</tt>. We are now back in the same
situation as <xref target="start" format="counter"></xref> above.
</li>
</ol>
</section>
<section anchor="differences">
<name>Technical Terms: Historical Differences</name>
<t>This appendix lists the major differences between the technical
terms used in NUT software release 2.8.0 and documented in this text,
and those used in previous version 2.7.4 of the NUT Project.
</t>
<table>
<thead>
<tr>
<th>Term in previous<br/>release NUT 2.7.4
	                    </th>
<th>Term in this document,<br/>release NUT 2.8.0
	                                              </th>
<th>Reference
</th>
</tr>
</thead>
<tbody>
<tr>
<td>ALREADY-LOGGED-IN   </td>
<td>ALREADY-ATTACHED      </td>
<td><xref target="errors"></xref>
</td>
</tr>
<tr>
<td>ALREADY-SSL-MODE    </td>
<td>TLS-ALREADY-ENABLED   </td>
<td><xref target="errors"></xref>
</td>
</tr>
<tr>
<td>LOGIN               </td>
<td><tt>ATTACH</tt>       </td>
<td><xref target="attach"></xref>
</td>
</tr>
<tr>
<td>LOGOUT              </td>
<td><tt>DETACH</tt>       </td>
<td><xref target="detach"></xref>
</td>
</tr>
<tr>
<td>Master              </td>
<td>Primary               </td>
<td><xref target="prim"></xref>
</td>
</tr>
<tr>
<td>NETVER              </td>
<td>PROTVER               </td>
<td><xref target="protver"></xref>
</td>
</tr>
<tr>
<td>NUMLOGINS           </td>
<td><tt>NUMATTACH</tt>    </td>
<td><xref target="numattach"></xref>
</td>
</tr>
<tr>
<td>Slave               </td>
<td>Secondary             </td>
<td><xref target="sec"></xref>
</td>
</tr>
</tbody>
</table>
</section>
<section anchor="AppendixEavesdropping">
<name>Security Defences in Release 2.7.4</name>
<t>Previous NUT version 2.7.4 did not provide support for TLS
v.3 <xref target="RFC8446"></xref>.  The following subsections
describe mitigating techniques.
</t>
<section anchor="Shims">
<name>Shims</name>
<t>Previous version 2.7.4 of NUT did not support TLS
v.3 <xref target="RFC8446"></xref>.  Where such protection is needed
for version 2.7.4, a possible technique introduces shims between the
Attachment Daemon and the network, and between the network and the Management Daemon as shown
in figure <xref target="fig.shim" format="counter"></xref>.  These shims
provide TLS v.3 support, thus allowing the Attachment Daemon and Management Daemon to continue
temporarily without native TLS.  The technique has been successfully
tested, but the principal difficulty is that the shims make use of a
second port which is not currently available.
</t>
<figure anchor="fig.shim">
<name>Shims provide TLS support during migration
</name>
<artwork align="center">              TLS shim listens     TLS shim listens
                 on port TBD1        on port 3493
 ,-----,------------,----,               ,----,--------------,
 | UPS - Attachment |TLS | &lt;-STARTTLS    | TLS|  Management  |
 |     |   Daemon   |shim|         OK--&gt; |shim|    Daemon    |
 /-----'------------'----\               '----'--------------'
         Listens on
       port nut/3493</artwork>
</figure>
<section>
<name>Attachment Daemon Shim</name>
<t>The shim in front of the Attachment Daemon listens to incoming traffic on a
port to be specified.  When it receives the command <tt>STARTTLS</tt> it
</t>
<ol spacing="compact" indent="adaptive">
<li>Returns <tt>OK</tt> to the client and sets up TLS encapsulation.
</li>
<li>Does not send <tt>STARTTLS</tt> to the Attachment Daemon port nut/3493.
</li>
</ol>
<t>All other commands and responses are passed through.
</t>
</section>
<section>
<name>Management Daemon Shim</name>
<t>The shim in front of the Management Daemon listens for incoming traffic on port
nut/3493.  When it receives the command <tt>STARTTLS</tt> it
</t>
<ol spacing="compact" indent="adaptive">
<li>Returns <tt>FEATURE-NOT-CONFIGURED</tt> to the client.
</li>
<li>Sends <tt>STARTTLS</tt> to the Attachment Daemon on a port to be specified.
</li>
</ol>
<t>All other commands and responses are passed through.
</t>
</section>
</section>
<section anchor="TLStunnel">
<name>TLS Tunnels</name>
<t>Another technique is the use of <xref target="RFC8446">TLS
tunnels</xref>, using a software such as
stunnel <xref target="stunnel"></xref> which adds OpenSSL-based TLS
support without modifying the Attachment Daemon or Management Daemon.  The NUT Project has no
procedure to enforce this on sites.
</t>
</section>
<section anchor="VPN">
<name>VPN</name>
<t>A further option to secure communications is very similar
to <xref target="RFC8446">TLS tunnelling</xref> and consists of
routing the NUT traffic through a Virtual Private Network, VPN.
</t>
</section>
<section anchor="VLAN">
<name>VLAN</name>
<t>A fourth option is to isolate the UPS management traffic at the
network switching level using a Virtual LAN, VLAN technique.
</t>
<figure anchor="fig.VLAN">
<name>UPS Management Protocol runs over its own VLAN
</name>
<artwork align="center">          ,-------------,               ,-------------,
,-----,   | Attachment  |               | Management  |
| UPS |---|   Daemon    |               |   Daemon    |
|     |   |-------------|      UPS      |-------------|
|     |===|             |   Management  |    UPS      |
/-----\   | Protected   |~~~~~~~~~~~~~~~| Management  |
          |  Server     |     VLAN      |   Client    |
          |             |               '-------------'
          '-------------'
      Production | VLAN
             ,---|-------,
            ,-----------,| 
           ,-----------,|'
           |  Clients  |'
           '-----------'</artwork>
</figure>
<t>In <xref target="fig.VLAN"></xref> there are two VLANS: The main
traffic between the protected server and its clients uses the
production VLAN. The UPS management traffic between the attachment and
management Daemons uses the UPS management VLAN marked as
~~~~~~~~~~~~~.
</t>
</section>
</section>
<section anchor="adsec">
<name>Administrative Security</name>
<t>Administrative commands such as <tt>FSD</tt>, <tt>INSTCMD</tt>
and <tt>SET</tt> are powerful and can have a deep effect on system
integrity, For example, the command <tt>FSD</tt> is involved in
mission critical system shutdown decisions.  Access to them needs to
be managed and restricted.  This clause presents the current practice.
</t>
<section anchor="adminuser">
<name>Management of Administrative Users</name>
<t>The Attachment Daemon maintains a file (currently <tt>upsd.users</tt>) defining
each administrative user.  Note that these users are independent of
those recorded in file <tt>/etc/passwd</tt>.  Each administrative user
gets its own section in file <tt>upsd.users</tt>. The declarations in
that section set the parameters which define that user's
privileges. The section begins with the name of the user enclosed in
square brackets, U+005B LEFT SQUARE BRACKET [ and U+005D RIGHT SQUARE
BRACKET ], and continues until the next user name in brackets or EOF.
</t>
<t>For example the following file declares two administrative users
<tt>admin</tt> and <tt>pfy</tt>:</t>
<sourcecode>   [admin]
       password = sekret
       upsmon master
       actions = SET
       instcmds = ALL
   [pfy]
       password = sekret
       instcmds = test.panel.start
       instcmds = test.panel.stop
</sourcecode>
<t>Within each section the administrative user declarations are:
</t>
<table>
<name>Administrative user declarations
</name>
<thead>
<tr>
<th align="center">Declaration </th>
<th align="center">Meaning
</th>
</tr>
</thead>
<tbody>
<tr>
<td><tt>actions</tt>
    </td>
<td><t>Allow the user to do certain things in the Attachment Daemon. To
        specify multiple actions, use multiple instances of the
        declaration. Valid actions are:
        </t><ul>
<li><tt>FSD</tt> Set the "Forced Shutdown" flag for this UPS.
	                 See <xref target="FSD"></xref>.
        </li>
<li><tt>SET</tt> Change the value of a UPS variable.  See <xref target="set"></xref>.
        </li>
</ul></td>
</tr>
<tr>
<td><tt>instcmds</tt>
    </td>
<td>Let a user initiate specific instant commands. See
        <xref target="instcmd"></xref>.  Use value <tt>ALL</tt> to grant all commands
        automatically. To specify multiple commands, use multiple
        instances of the instcmds field. For the full list of what a
        given UPS supports, use client <tt>upscmd -l</tt> supplied by
        the NUT Project.  The <tt>LIST CMD</tt> command is issued within
        the client <tt>upscmd</tt>.
    </td>
</tr>
<tr>
<td><tt>password</tt>
    </td>
<td>Set the password for this user.  <em>Your password should be
    more secure than the examples shown.</em>
</td>
</tr>
<tr>
<td><tt>upsmon</tt>
    </td>
<td>Add the necessary actions for a Management Daemon to process a system
    shutdown. In current practice the value is still <tt>master</tt>
    or <tt>slave</tt>.  Note that there is no U+003D EQUALS SIGN =.
</td>
</tr>
</tbody>
</table>
</section>
<section anchor="adsecclient">
<name>An Administrative User of a Client Management Daemon</name>
<t>The following examples show the current security practices for
administrative users of a client Management Daemon They also illustrate the
command pair <tt>USERNAME</tt> and <tt>PASSWORD</tt>.  See <xref target="username"></xref>
and <xref target="password"></xref>.
</t>
<section>
<name>An Administrative User Logs into a Short Session</name>
<t>In this simple example of current practice, the system
administrator sets the battery level at which an Attachment Daemon will raise the
status <tt>LB</tt>, represented by variable <tt>battery.charge.low</tt>, to
35% of full charge.  A system administrator types the following command
to call the client <tt>upsrw</tt> supplied by the
NUT Project.</t>
<sourcecode>upsrw -s battery.charge.low=35 -u admin -p sekret UPS-1@example.com
</sourcecode>
<t>The <tt>USERNAME</tt> and <tt>PASSWORD</tt> commands are issued
within the client <tt>upsrw</tt> and the Session is of short duration.
</t>
<section anchor="longsess">
<name>An Administrative User Logs into a Long Session</name>
<t>In this second example of current practice, the long-running
Management Daemon <tt>upsmon</tt> which is responsible for initiating system
shutdowns and which is provided by the NUT Project issues commands
<tt>USERNAME</tt> and <tt>PASSWORD</tt> when it starts up. The data
values needed for the
<tt>USERNAME</tt> and <tt>PASSWORD</tt> commands are provided by a
configuration file <tt>upsmon.conf</tt> which contains the
line</t>
<sourcecode>MONITOR UPS-1@example.com 1 admin sekret master
</sourcecode>
<t> This says that the UPS to be monitored
is <tt>UPS-1@example.com</tt>, it provides 1 single power supply, the
administrative user is <tt>admin</tt> with
password <tt>sekret</tt>. The Management Daemon acts as a Primary, although
current practice uses the term <tt>master</tt>.
</t>
<t>The <tt>USERNAME</tt> and <tt>PASSWORD</tt> commands are contained
within the client <tt>upsmon</tt> and the Session is of long duration.
</t>
</section>
</section>
</section>
</section>
<section removeInRFC="true">
<name>Change Log</name>
<t><cref>Ed: To be removed on publication.</cref>
</t>
<section>
<name>Changes in Version 01</name>
<ol spacing="compact" indent="adaptive">
<li>There is exactly <xref target="onenewline" format="counter">one
newline</xref> at the end of commands and responses.
</li>
<li>Added descriptions to variables in <xref target="Annex1" format="counter">Annex</xref>.
</li>
<li>Added clause <xref target="events" format="counter">Events</xref>.
</li>
</ol>
</section>
<section>
<name>Changes in Version 02</name>
<ol spacing="compact" indent="adaptive">
<li>Extended acknowledgments.
</li>
<li>Added reference to possible use of RFC1628 between driver and Attachment Daemon.
</li>
<li>Clarified response to command <tt>LIST CLIENT</tt>.
</li>
</ol>
</section>
<section>
<name>Changes in Version 03</name>
<ol spacing="compact" indent="adaptive">
<li>Clarified description of Attachment Daemon.
</li>
<li>Added Implementation status section as recommended
by <xref target="RFC7942">RFC 7942</xref>.
</li>
<li>Rewrote <xref target="projreq"></xref>.
</li>
<li>Clarified <xref target="Annex1"></xref> as being merely an example
of variables used for a specific UPS product.
</li>
<li>Added definition of <tt>&lt;upsname&gt;</tt>
in <xref target="commands"></xref>.
</li>
</ol>
</section>
<section>
<name>Changes in Version 04</name>
<t>There are many changes in this version following the ISE review.
See reply to ISE review: <tt>http://rogerprice.org/NUT/ISE-comments-2021-06-14.reply.html</tt> Among other changes are:
</t>
<ol spacing="compact" indent="adaptive">
<li><xref target="Codepoint" format="counter">Section</xref> becomes "Codepoint Management".
</li>
<li>Editorial cleanup. All <tt>&lt;aside&gt;</tt> elements labelled as notes.
</li>
<li>Added implementation note to <xref target="list"></xref>.
</li>
<li>Error message <tt>ALREADY-SSL-MODE</tt> becomes <tt>ALREADY-TSL-ENABLED</tt>.
</li>
<li>Added error message  <tt>TSL-NOT-ENABLED</tt>.
</li>
<li>Typo in clause <xref target="st">UPS status</xref>.
</li>
<li>Removed all reference to use of RFC1628 between driver and Attachment Daemon.
</li>
<li>In <xref target="commands"></xref> field [:&lt;port&gt;] is always
available in &lt;upsname&gt;
</li>
<li>Added technical term administrative user.
</li>
<li>Added appendix <xref target="differences" format="counter">Technical terms:
Historical differences</xref>
</li>
<li>Added table of "successful" responses: <xref target="success" format="counter">Response when command succeeds</xref>
</li>
<li>Three commands change name <tt>LOGIN</tt> -&gt;
<tt>ATTACH</tt>, <tt>LOGOUT</tt> -&gt; <tt>DETACH</tt> and <tt>NUMLOGINS</tt> -&gt;
<tt>NUMATTACH</tt>.
</li>
<li>Error message <tt>ALREADY-LOGGED-IN</tt> becomes <tt>ALREADY-ATTACHED</tt>. 
</li>
</ol>
</section>
<section>
<name>Changes in Version 05</name>
<t>This version includes changes made following comments by the reviewers.
</t>
<ol spacing="compact" indent="adaptive">
<li>Abstract: Change "takes" -&gt; "automates".
</li>
<li>Abstract: Change "Current practice" -&gt; "Current practice when this
text was written".
</li>
<li>Abstract: Change "leads to" -&gt; "risks".
</li>
<li><xref target="HowtoRead" format="counter">Section</xref>, Added sentence on
use of "public power supply".
</li>
<li><xref target="intro" format="counter">Section</xref>, Change "shutting
down..."  -&gt; "performing a managed shutdown of unattended..."
</li>
<li><xref target="AddInf" format="counter">Section</xref> added link to NUT
documentation.
</li>
<li><xref target="Terminology" format="counter">Section</xref> added "They
are listed in alphabetical order."
</li>
<li><xref target="AD" format="counter">Section</xref> Change "talks to the
UPS" -&gt; "retrieves status from the UPS and sends commands to it".
</li>
<li><xref target="AD" format="counter">Section</xref> Change "... launched
as system user root and drops privilege ..."  -&gt; "... launched as
system user root to allow direct access to the hardware
(e.g. <tt>/proc</tt>, <tt>/dev</tt>).  For better security, the daemon
then drops privilege ..."
</li>
<li><xref target="au" format="counter">Section</xref> Change "Management Daemon users."
-&gt; "Management Daemon users which authenticate to the attachment daemon with
basic credentials (username and password)."
</li>
<li><xref target="au" format="counter">Section</xref> Change "... and are
defined by a file in the ..." -&gt; "... and are listed in a text file
which is read by the ...".
</li>
<li><xref target="au" format="counter">Section</xref> Added link
to <xref target="adminuser"></xref>.
</li>
<li><xref target="Driver" format="counter">Section</xref> Change "specific to
the hardware" -&gt; "specific to the UPS hardware"
</li>
<li><xref target="IC" format="counter">Section</xref> Change "causes the
hardware" -&gt; "is passed to the driver and sent to the hardware".
</li>
<li><xref target="IC" format="counter">Section</xref> Change "to
immediately" -&gt; "without any configured delay to".
</li>
<li><xref target="MD" format="counter">Section</xref> Change "the system
reaction to power loss." -&gt; "orchestrating system-wide actions
after a power event."
</li>
<li><xref target="proj" format="counter">Section</xref> Title "NUT Project"
-&gt; "NUT Software Project".
</li>
<li><xref target="prim" format="counter">Section</xref> Change "the system to
which the data lead is connected" -&gt; "the computer running the
driver".
</li>
<li><xref target="sec" format="counter">Section</xref> Replaced and clarified
"data lead" not present with secondaries.
</li>
<li><xref target="sess" format="counter">Section</xref> Change "may open a
session" -&gt; "may initiate a TCP session".
</li>
<li><xref target="st" format="counter">Section</xref> Change "are considered
fundamental and are" -&gt; "MUST be".
</li>
<li><xref target="st" format="counter">Section</xref> Change "other statuses
depend" -&gt; "other statuses are OPTIONAL and depend".
</li>
<li><xref target="var" format="counter">Section</xref> Change "The features"
-&gt; "The metrics and identifiers".
</li>
<li><xref target="var" format="counter">Section</xref> Change "current value
attached to that feature" -&gt; "value representing that metric or
identifier".
</li>
<li><xref target="var" format="counter">Section</xref> Added a note: "Note:
Some variables are constants, e.g.  battery type, manufacturer."
</li>
<li><xref target="overview" format="counter">Section</xref> Rewrote
paragraph to clarify "the Attachment Daemon and the Management daemon
which act as <strong>server</strong> and <strong>client</strong>
respectively."
</li>
<li><xref target="overview" format="counter">Section</xref> Change "run the
Attachment Daemon (2.1)." -&gt; "run the Attachment Daemon (2.1), thereby
effectively creating a network attached UPS running a standard
protocol."
</li>
<li><xref target="fig.oview4" format="counter">Figure</xref> In the note:
replaced "but if the UPS had status OB the Secondary shuts down."  by
"but if the UPS had status <tt>OB</tt> the Secondary may choose to shut down
as a precaution."
</li>
<li><xref target="Notation" format="counter">Section</xref> Added scholarly
historical note.
</li>
<li><xref target="commands" format="counter">Section</xref>
Change "of the port" -&gt; "of the TCP port".
</li>
<li><xref target="attach" format="counter">Section</xref> Change "the count is
1 (the Primary (2.8)) + the number of Secondaries (2.9)" -&gt; "the count
is 1 for the primary + the number of secondaries".  Change "a trio of"
to "three".
</li>
<li><xref target="FSD" format="counter">Section</xref> Clarify that "FSD" means
"Forced Shutdown".
</li>
<li><xref target="FSD" format="counter">Section</xref> Change "only to a
high-level" -&gt; "only to a privileged".
</li>
<li><xref target="get" format="counter">Section</xref> Added prefix GET to
all the subcommands.
</li>
<li><xref target="list" format="counter">Section</xref> Added prefix LIST to
all the subcommands.
</li>
<li><xref target="list" format="counter">Section</xref> Change "common
container" -&gt; "common".
</li>
<li><xref target="list" format="counter">Section</xref>
Change "then go off and wait for the response" to "wait".
</li>
<li><xref target="protver" format="counter">Section</xref> Added note
differentiating <xref target="protver"></xref> and <xref target="ver"></xref>.
</li>
<li><xref target="set" format="counter">Section</xref> Changed "and the UPS
model." -&gt; "and the UPS model. Some variables are read-only due to the
design of the UPS or its driver."
</li>
<li><xref target="starttls" format="counter">Section</xref> Changed "The choice
of TLS version is a matter for site security policy and is not
specified in this document." -&gt; "The parameters and versions of
cryptographic libraries are those of the Attachment Daemon's
underlying OS and are outside the scope of this document."
</li>
<li><xref target="username" format="counter">Section</xref> Change "provides
facilities to limit access to the UPS unit(s) to which it is
attached." -&gt; "limits access to clients whose credentials match those
in the file <tt>upsd.users</tt>.  There is no anonymous access."
</li>
<li><xref target="ver" format="counter">Section</xref> Added note
differentiating <xref target="ver"></xref> and <xref target="protver"></xref>.
</li>
<li><xref target="symbols" format="counter">Section</xref> Change "public
supply", "wall power" and "input supply" -&gt; "input power supply", nine
places.
</li>
<li><xref target="symbols" format="counter">Section</xref> Remove notes from
CHRG and DISCHARG.
</li>
<li><xref target="symbols" format="counter">Section</xref> OB: Removed "offline".
</li>
<li><xref target="events" format="counter">Section</xref> Change "deduces" -&gt;
"detects".
</li>
<li><xref target="events" format="counter">Section</xref> Change "valuable
resources" -&gt; "compute and network resources" .
</li>
<li><xref target="events" format="counter">Section</xref> Change "will not have
up-to-date information about the UPS status" -&gt; "risks missing
short-lived changes in the UPS status"
</li>
<li><xref target="Shims" format="counter">Section</xref> After "imposed by a
wave of the hand" added "it cannot be implemented quickly and without
impact to many deployed systems".
</li>
<li><xref target="VPN" format="counter">Section</xref> Added section.
</li>
<li><xref target="VLAN" format="counter">Section</xref> Added section with
figure.
</li>
<li><xref target="projreq" format="counter">Section</xref> Added "Note: In
Unix-like systems a port with a number below 1024 is privileged and
requires elevated permissions to manage."
</li>
<li><xref target="ChangeReg" format="counter">Section</xref> Change "but
accepts" -&gt; "but will accept".
</li>
<li><xref target="Annex1" format="counter">Appendix</xref> Change "domestic" -&gt;
"consumer grade".
</li>
<li><xref target="shutdownstory" format="counter">Appendix</xref> <xref target="upsdrvctl" format="counter">item</xref>
Change <em>Note that the "shut down" of a UPS does not turn the UPS
off completely.  It disconnects the outlet sockets.  Such a delayed
shutdown is audible since the characteristic beeping of a UPS
stops.</em> -&gt; <em>Note that the "shutdown" of a UPS removes power
from the outlet sockets, but may not turn the UPS off completely.
A delayed shutdown is sometimes audible, and the characteristic
beeping of the UPS stops.</em>
</li>
</ol>
</section>
<section>
<name>Changes in Version 06</name>
<t>This version includes changes made following comments by the reviewers.
</t>
<ol spacing="compact" indent="adaptive">
<li><xref target="starttls" format="counter">Section</xref> Added sentence to
permit unencrypted communication.
</li>
<li>Added <xref target="MinSup" format="counter">Section</xref> Recommended
Minimum Support
</li>
<li>Changed "long-running Attachment Daemon <tt>upsmon</tt>" -&gt; "long-running
Management Daemon <tt>upsmon</tt>".  Text now moved to appendix.
</li>
<li><xref target="shutdownstory" format="counter">Appendix</xref>
<xref target="setFSD" format="counter">item</xref>.  Added clarification
of the use of status symbol <tt>FSD</tt> and command <xref target="set"></xref>
<tt>NUMATTACH</tt>.
</li>
<li><xref target="overview" format="counter">Section</xref> <xref target="fig.oview2"></xref> Changed "a
standard protocol" -&gt; "a published protocol".
</li>
</ol>
</section>
<section>
<name>Changes in Version 07</name>
<t>This version includes changes made following comments by reviewers
at the request of the IETF's Independent Submissions Editor.
</t>
<ol spacing="compact" indent="adaptive">
<li><xref target="au" format="counter">Section</xref> Cosmetic change.
</li>
<li><xref target="proj" format="counter">Section</xref> Added reference to
<xref target="nut-repository">GitHub repository</xref>.
</li>
<li><xref target="commands" format="counter">Section</xref> Added paragraph to
explain that NUT is not case sensitive.
</li>
<li><xref target="list" format="counter">Section</xref> Rewrote first sentence:
"All the LIST commands..."
</li>
<li><xref target="AgentVerif" format="counter">Section</xref> Rewrote 2nd
sentence as follows: The administrative user name and password need
protection from sniffing and local malicious users. This is done by
encrypting the traffic and properly restricting access to the
configuration files.  (Text has since been thoroughly reworked.)
</li>
<li><xref target="TLStunnel" format="counter">Section</xref> Replace SSL by
TLS.
</li>
<li><xref target="VPN" format="counter">Section</xref> Replace SSH by
TLS. Remove &lt;aside&gt;.
</li>
<li><xref target="Annex1" format="counter">Appendix</xref> <xref target="typvar" format="counter">table</xref>
Added <tt>ups.temperature</tt>
</li>
<li><xref target="shutdownstory" format="counter">Appendix</xref> The Shutdown
Story, BIOS options.  I removed wording
from <xref target="UPSshutdown"></xref> and completed the wording
in <xref target="UPSrestart"></xref>.
</li>
</ol>
</section>
<section>
<name>Changes in Version 08</name>
<t>This version includes further changes made following comments by
reviewers at the request of the IETF's Independent Submissions Editor.
</t>
<section>
<name>Technical changes</name>
<ol spacing="compact" indent="adaptive">
<li><xref target="arno"></xref>.  Arnaud took over in 2005, not 2001.
Added <xref target="githist">reference to project history on GitHub</xref>.
</li>
</ol>
</section>
<section>
<name>Editorial changes following initial ISE comments</name>
<ol spacing="compact" indent="adaptive">
<li>Removed <tt>counter</tt> attribute from <tt>&lt;xref&gt;</tt> to
prevent ()s.
</li>
<li>Removed most content from <tt>&lt;xref&gt;</tt>.
</li>
<li>References become more literary and less "hypertext".
</li>
<li>Most keywords and symbols are no longer clickable. 
</li>
</ol>
</section>
</section>
</section>
</back>
</rfc>
