<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="info" docName="draft-rprice-ups-management-protocol-15" indexInclude="true" ipr="trust200902" number="9271" prepTime="2022-08-09T16:19:26" scripts="Common,Latin" sortRefs="true" submissionType="independent" symRefs="true" tocDepth="4" tocInclude="true" xml:lang="en">
  <link href="https://datatracker.ietf.org/doc/draft-rprice-ups-management-protocol-15" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc9271" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="UPS Management Protocol">Uninterruptible Power Supply (UPS) Management Protocol -- Commands and Responses</title>
    <seriesInfo name="RFC" value="9271" stream="independent"/>
    <author initials="R." surname="Price" fullname="Roger Price" role="editor">
      <organization showOnFrontPage="true">Network UPS Tools Project</organization>
      <address>
        <postal>
          <country>France</country>
        </postal>
        <email>ietf@rogerprice.org</email>
      </address>
    </author>
    <date month="08" year="2022"/>
    <keyword>Uninterruptible</keyword>
    <keyword>Power</keyword>
    <keyword>Supply</keyword>
    <keyword>UPS</keyword>
    <keyword>NUT</keyword>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">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 that 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.  The practice current when this protocol was first
developed risks weak security, and this is addressed in the Security
Considerations sections of this document.
</t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t indent="0" pn="section-boilerplate.1-1">
            This document is not an Internet Standards Track specification; it is
            published for informational purposes.
        </t>
        <t indent="0" pn="section-boilerplate.1-2">
            This is a contribution to the RFC Series, independently of any
            other RFC stream.  The RFC Editor has chosen to publish this
            document at its discretion and makes no statement about its value
            for implementation or deployment.  Documents approved for
            publication by the RFC Editor are not candidates for any level of
            Internet Standard; see Section 2 of RFC 7841.
        </t>
        <t indent="0" pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc9271" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t indent="0" pn="section-boilerplate.2-1">
            Copyright (c) 2022 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t indent="0" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2">
              <li pn="section-toc.1-1.1.2.1">
                <t indent="0" pn="section-toc.1-1.1.2.1.1"><xref derivedContent="1.1" format="counter" sectionFormat="of" target="section-1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-current-practice">Current Practice</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2.1.2">
                  <li pn="section-toc.1-1.1.2.1.2.1">
                    <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.2.1.1"><xref derivedContent="1.1.1" format="counter" sectionFormat="of" target="section-1.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-nut-project">NUT Project</xref></t>
                  </li>
                  <li pn="section-toc.1-1.1.2.1.2.2">
                    <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.2.2.1"><xref derivedContent="1.1.2" format="counter" sectionFormat="of" target="section-1.1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-shutdown-story">The Shutdown Story</xref></t>
                  </li>
                  <li pn="section-toc.1-1.1.2.1.2.3">
                    <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.2.3.1"><xref derivedContent="1.1.3" format="counter" sectionFormat="of" target="section-1.1.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-how-to-read-this-document">How to Read this Document</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.1.2.2">
                <t indent="0" pn="section-toc.1-1.1.2.2.1"><xref derivedContent="1.2" format="counter" sectionFormat="of" target="section-1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-additional-information">Additional Information</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.3">
                <t indent="0" pn="section-toc.1-1.1.2.3.1"><xref derivedContent="1.3" format="counter" sectionFormat="of" target="section-1.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-requirements-language">Requirements Language</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-terminology">Terminology</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2">
              <li pn="section-toc.1-1.2.2.1">
                <t indent="0" pn="section-toc.1-1.2.2.1.1"><xref derivedContent="2.1" format="counter" sectionFormat="of" target="section-2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-administrative-user">Administrative User</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.2">
                <t indent="0" pn="section-toc.1-1.2.2.2.1"><xref derivedContent="2.2" format="counter" sectionFormat="of" target="section-2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-attachment-daemon">Attachment Daemon</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.3">
                <t indent="0" pn="section-toc.1-1.2.2.3.1"><xref derivedContent="2.3" format="counter" sectionFormat="of" target="section-2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-driver">Driver</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.4">
                <t indent="0" pn="section-toc.1-1.2.2.4.1"><xref derivedContent="2.4" format="counter" sectionFormat="of" target="section-2.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-event">Event</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.5">
                <t indent="0" pn="section-toc.1-1.2.2.5.1"><xref derivedContent="2.5" format="counter" sectionFormat="of" target="section-2.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-instant-command">Instant Command</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.6">
                <t indent="0" pn="section-toc.1-1.2.2.6.1"><xref derivedContent="2.6" format="counter" sectionFormat="of" target="section-2.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-management-daemon">Management Daemon</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.7">
                <t indent="0" pn="section-toc.1-1.2.2.7.1"><xref derivedContent="2.7" format="counter" sectionFormat="of" target="section-2.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-primary">Primary</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.8">
                <t indent="0" pn="section-toc.1-1.2.2.8.1"><xref derivedContent="2.8" format="counter" sectionFormat="of" target="section-2.8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-secondary">Secondary</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.9">
                <t indent="0" pn="section-toc.1-1.2.2.9.1"><xref derivedContent="2.9" format="counter" sectionFormat="of" target="section-2.9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-session">Session</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.10">
                <t indent="0" pn="section-toc.1-1.2.2.10.1"><xref derivedContent="2.10" format="counter" sectionFormat="of" target="section-2.10"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-ups-status">UPS Status</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.11">
                <t indent="0" pn="section-toc.1-1.2.2.11.1"><xref derivedContent="2.11" format="counter" sectionFormat="of" target="section-2.11"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-ups-variable">UPS Variable</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-protocol-overview">Protocol Overview</xref></t>
          </li>
          <li pn="section-toc.1-1.4">
            <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-protocol-specification">Protocol Specification</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2">
              <li pn="section-toc.1-1.4.2.1">
                <t indent="0" pn="section-toc.1-1.4.2.1.1"><xref derivedContent="4.1" format="counter" sectionFormat="of" target="section-4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-notation-used-in-this-speci">Notation Used in this Specification</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.2">
                <t indent="0" pn="section-toc.1-1.4.2.2.1"><xref derivedContent="4.2" format="counter" sectionFormat="of" target="section-4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-commands">Commands</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.2.2">
                  <li pn="section-toc.1-1.4.2.2.2.1">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.1.1"><xref derivedContent="4.2.1" format="counter" sectionFormat="of" target="section-4.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-attach"><tt>ATTACH</tt></xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.2.2.2">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.2.1"><xref derivedContent="4.2.2" format="counter" sectionFormat="of" target="section-4.2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-detach"><tt>DETACH</tt></xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.2.2.3">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.3.1"><xref derivedContent="4.2.3" format="counter" sectionFormat="of" target="section-4.2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-fsd"><tt>FSD</tt></xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.2.2.4">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.4.1"><xref derivedContent="4.2.4" format="counter" sectionFormat="of" target="section-4.2.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-get"><tt>GET</tt></xref></t>
                    <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.2.2.4.2">
                      <li pn="section-toc.1-1.4.2.2.2.4.2.1">
                        <t indent="0" pn="section-toc.1-1.4.2.2.2.4.2.1.1"><xref derivedContent="4.2.4.1" format="counter" sectionFormat="of" target="section-4.2.4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-get-cmddesc"><tt>GET CMDDESC</tt></xref></t>
                      </li>
                      <li pn="section-toc.1-1.4.2.2.2.4.2.2">
                        <t indent="0" pn="section-toc.1-1.4.2.2.2.4.2.2.1"><xref derivedContent="4.2.4.2" format="counter" sectionFormat="of" target="section-4.2.4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-get-desc"><tt>GET DESC</tt></xref></t>
                      </li>
                      <li pn="section-toc.1-1.4.2.2.2.4.2.3">
                        <t indent="0" pn="section-toc.1-1.4.2.2.2.4.2.3.1"><xref derivedContent="4.2.4.3" format="counter" sectionFormat="of" target="section-4.2.4.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-get-numattach"><tt>GET NUMATTACH</tt></xref></t>
                      </li>
                      <li pn="section-toc.1-1.4.2.2.2.4.2.4">
                        <t indent="0" pn="section-toc.1-1.4.2.2.2.4.2.4.1"><xref derivedContent="4.2.4.4" format="counter" sectionFormat="of" target="section-4.2.4.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-get-type"><tt>GET TYPE</tt></xref></t>
                      </li>
                      <li pn="section-toc.1-1.4.2.2.2.4.2.5">
                        <t indent="0" pn="section-toc.1-1.4.2.2.2.4.2.5.1"><xref derivedContent="4.2.4.5" format="counter" sectionFormat="of" target="section-4.2.4.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-get-upsdesc"><tt>GET UPSDESC</tt></xref></t>
                      </li>
                      <li pn="section-toc.1-1.4.2.2.2.4.2.6">
                        <t indent="0" pn="section-toc.1-1.4.2.2.2.4.2.6.1"><xref derivedContent="4.2.4.6" format="counter" sectionFormat="of" target="section-4.2.4.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-get-var"><tt>GET VAR</tt></xref></t>
                      </li>
                    </ul>
                  </li>
                  <li pn="section-toc.1-1.4.2.2.2.5">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.5.1"><xref derivedContent="4.2.5" format="counter" sectionFormat="of" target="section-4.2.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-help"><tt>HELP</tt></xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.2.2.6">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.6.1"><xref derivedContent="4.2.6" format="counter" sectionFormat="of" target="section-4.2.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-instcmd"><tt>INSTCMD</tt></xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.2.2.7">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.7.1"><xref derivedContent="4.2.7" format="counter" sectionFormat="of" target="section-4.2.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-list"><tt>LIST</tt></xref></t>
                    <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.2.2.7.2">
                      <li pn="section-toc.1-1.4.2.2.2.7.2.1">
                        <t indent="0" pn="section-toc.1-1.4.2.2.2.7.2.1.1"><xref derivedContent="4.2.7.1" format="counter" sectionFormat="of" target="section-4.2.7.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-list-client"><tt>LIST CLIENT</tt></xref></t>
                      </li>
                      <li pn="section-toc.1-1.4.2.2.2.7.2.2">
                        <t indent="0" pn="section-toc.1-1.4.2.2.2.7.2.2.1"><xref derivedContent="4.2.7.2" format="counter" sectionFormat="of" target="section-4.2.7.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-list-cmd"><tt>LIST CMD</tt></xref></t>
                      </li>
                      <li pn="section-toc.1-1.4.2.2.2.7.2.3">
                        <t indent="0" pn="section-toc.1-1.4.2.2.2.7.2.3.1"><xref derivedContent="4.2.7.3" format="counter" sectionFormat="of" target="section-4.2.7.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-list-enum"><tt>LIST ENUM</tt></xref></t>
                      </li>
                      <li pn="section-toc.1-1.4.2.2.2.7.2.4">
                        <t indent="0" pn="section-toc.1-1.4.2.2.2.7.2.4.1"><xref derivedContent="4.2.7.4" format="counter" sectionFormat="of" target="section-4.2.7.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-list-range"><tt>LIST RANGE</tt></xref></t>
                      </li>
                      <li pn="section-toc.1-1.4.2.2.2.7.2.5">
                        <t indent="0" pn="section-toc.1-1.4.2.2.2.7.2.5.1"><xref derivedContent="4.2.7.5" format="counter" sectionFormat="of" target="section-4.2.7.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-list-rw"><tt>LIST RW</tt></xref></t>
                      </li>
                      <li pn="section-toc.1-1.4.2.2.2.7.2.6">
                        <t indent="0" pn="section-toc.1-1.4.2.2.2.7.2.6.1"><xref derivedContent="4.2.7.6" format="counter" sectionFormat="of" target="section-4.2.7.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-list-ups"><tt>LIST UPS</tt></xref></t>
                      </li>
                      <li pn="section-toc.1-1.4.2.2.2.7.2.7">
                        <t indent="0" pn="section-toc.1-1.4.2.2.2.7.2.7.1"><xref derivedContent="4.2.7.7" format="counter" sectionFormat="of" target="section-4.2.7.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-list-var"><tt>LIST VAR</tt></xref></t>
                      </li>
                    </ul>
                  </li>
                  <li pn="section-toc.1-1.4.2.2.2.8">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.8.1"><xref derivedContent="4.2.8" format="counter" sectionFormat="of" target="section-4.2.8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-password"><tt>PASSWORD</tt></xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.2.2.9">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.9.1"><xref derivedContent="4.2.9" format="counter" sectionFormat="of" target="section-4.2.9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-primary-2"><tt>PRIMARY</tt></xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.2.2.10">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.10.1"><xref derivedContent="4.2.10" format="counter" sectionFormat="of" target="section-4.2.10"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-protver"><tt>PROTVER</tt></xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.2.2.11">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.11.1"><xref derivedContent="4.2.11" format="counter" sectionFormat="of" target="section-4.2.11"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-set"><tt>SET</tt></xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.2.2.12">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.12.1"><xref derivedContent="4.2.12" format="counter" sectionFormat="of" target="section-4.2.12"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-starttls"><tt>STARTTLS</tt></xref></t>
                    <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.2.2.12.2">
                      <li pn="section-toc.1-1.4.2.2.2.12.2.1">
                        <t indent="0" pn="section-toc.1-1.4.2.2.2.12.2.1.1"><xref derivedContent="4.2.12.1" format="counter" sectionFormat="of" target="section-4.2.12.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-key-infrastructure-and-self">Key Infrastructure and Self-Signed Certificates</xref></t>
                      </li>
                    </ul>
                  </li>
                  <li pn="section-toc.1-1.4.2.2.2.13">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.13.1"><xref derivedContent="4.2.13" format="counter" sectionFormat="of" target="section-4.2.13"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-username"><tt>USERNAME</tt></xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.2.2.14">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.14.1"><xref derivedContent="4.2.14" format="counter" sectionFormat="of" target="section-4.2.14"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-ver"><tt>VER</tt></xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.4.2.3">
                <t indent="0" pn="section-toc.1-1.4.2.3.1"><xref derivedContent="4.3" format="counter" sectionFormat="of" target="section-4.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-summary-of-responses">Summary of Responses</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.3.2">
                  <li pn="section-toc.1-1.4.2.3.2.1">
                    <t indent="0" pn="section-toc.1-1.4.2.3.2.1.1"><xref derivedContent="4.3.1" format="counter" sectionFormat="of" target="section-4.3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-response-when-command-succe">Response When Command Succeeds</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.3.2.2">
                    <t indent="0" pn="section-toc.1-1.4.2.3.2.2.1"><xref derivedContent="4.3.2" format="counter" sectionFormat="of" target="section-4.3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-error-responses">Error Responses</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.4.2.4">
                <t indent="0" pn="section-toc.1-1.4.2.4.1"><xref derivedContent="4.4" format="counter" sectionFormat="of" target="section-4.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-an-abnf-of-the-commands">An ABNF of the Commands</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.4.2">
                  <li pn="section-toc.1-1.4.2.4.2.1">
                    <t indent="0" pn="section-toc.1-1.4.2.4.2.1.1"><xref derivedContent="4.4.1" format="counter" sectionFormat="of" target="section-4.4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-responses-to-commands">Responses to Commands</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.5">
            <t indent="0" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-statuses-and-events">Statuses and Events</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2">
              <li pn="section-toc.1-1.5.2.1">
                <t indent="0" pn="section-toc.1-1.5.2.1.1"><xref derivedContent="5.1" format="counter" sectionFormat="of" target="section-5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-status-symbols">Status Symbols</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.2">
                <t indent="0" pn="section-toc.1-1.5.2.2.1"><xref derivedContent="5.2" format="counter" sectionFormat="of" target="section-5.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-events">Events</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.6">
            <t indent="0" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.6.2">
              <li pn="section-toc.1-1.6.2.1">
                <t indent="0" pn="section-toc.1-1.6.2.1.1"><xref derivedContent="6.1" format="counter" sectionFormat="of" target="section-6.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-current-general-security-pr">Current General Security Practice</xref></t>
              </li>
              <li pn="section-toc.1-1.6.2.2">
                <t indent="0" pn="section-toc.1-1.6.2.2.1"><xref derivedContent="6.2" format="counter" sectionFormat="of" target="section-6.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-communication-security-requ">Communication Security Requirements</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.6.2.2.2">
                  <li pn="section-toc.1-1.6.2.2.2.1">
                    <t indent="0" pn="section-toc.1-1.6.2.2.2.1.1"><xref derivedContent="6.2.1" format="counter" sectionFormat="of" target="section-6.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-certificate-security">Certificate Security</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.6.2.3">
                <t indent="0" pn="section-toc.1-1.6.2.3.1"><xref derivedContent="6.3" format="counter" sectionFormat="of" target="section-6.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-attacks-and-defenses">Attacks and Defenses</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.6.2.3.2">
                  <li pn="section-toc.1-1.6.2.3.2.1">
                    <t indent="0" pn="section-toc.1-1.6.2.3.2.1.1"><xref derivedContent="6.3.1" format="counter" sectionFormat="of" target="section-6.3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-eavesdropping">Eavesdropping</xref></t>
                    <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.6.2.3.2.1.2">
                      <li pn="section-toc.1-1.6.2.3.2.1.2.1">
                        <t indent="0" pn="section-toc.1-1.6.2.3.2.1.2.1.1"><xref derivedContent="6.3.1.1" format="counter" sectionFormat="of" target="section-6.3.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-misplaced-declarations-requ">Misplaced Declarations Requiring TLS</xref></t>
                      </li>
                      <li pn="section-toc.1-1.6.2.3.2.1.2.2">
                        <t indent="0" pn="section-toc.1-1.6.2.3.2.1.2.2.1"><xref derivedContent="6.3.1.2" format="counter" sectionFormat="of" target="section-6.3.1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-weak-protection-in-previous">Weak Protection in Previous Version 2.7.4</xref></t>
                      </li>
                    </ul>
                  </li>
                  <li pn="section-toc.1-1.6.2.3.2.2">
                    <t indent="0" pn="section-toc.1-1.6.2.3.2.2.1"><xref derivedContent="6.3.2" format="counter" sectionFormat="of" target="section-6.3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-man-in-the-middle">Man-in-the-Middle</xref></t>
                  </li>
                  <li pn="section-toc.1-1.6.2.3.2.3">
                    <t indent="0" pn="section-toc.1-1.6.2.3.2.3.1"><xref derivedContent="6.3.3" format="counter" sectionFormat="of" target="section-6.3.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-masquerade-attack-agent-ver">Masquerade Attack: Agent Verification</xref></t>
                  </li>
                  <li pn="section-toc.1-1.6.2.3.2.4">
                    <t indent="0" pn="section-toc.1-1.6.2.3.2.4.1"><xref derivedContent="6.3.4" format="counter" sectionFormat="of" target="section-6.3.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-message-insertion-deletion-">Message Insertion, Deletion, and Modification</xref></t>
                  </li>
                  <li pn="section-toc.1-1.6.2.3.2.5">
                    <t indent="0" pn="section-toc.1-1.6.2.3.2.5.1"><xref derivedContent="6.3.5" format="counter" sectionFormat="of" target="section-6.3.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-replay">Replay</xref></t>
                  </li>
                  <li pn="section-toc.1-1.6.2.3.2.6">
                    <t indent="0" pn="section-toc.1-1.6.2.3.2.6.1"><xref derivedContent="6.3.6" format="counter" sectionFormat="of" target="section-6.3.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-denial-of-service">Denial of Service</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="8" format="counter" sectionFormat="of" target="section-8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-implementation-status">Implementation Status</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.8.2">
              <li pn="section-toc.1-1.8.2.1">
                <t indent="0" pn="section-toc.1-1.8.2.1.1"><xref derivedContent="8.1" format="counter" sectionFormat="of" target="section-8.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-inclusion-in-software-distr">Inclusion in Software Distributions</xref></t>
              </li>
              <li pn="section-toc.1-1.8.2.2">
                <t indent="0" pn="section-toc.1-1.8.2.2.1"><xref derivedContent="8.2" format="counter" sectionFormat="of" target="section-8.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-recommended-minimum-support">Recommended Minimum Support</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.8.2.2.2">
                  <li pn="section-toc.1-1.8.2.2.2.1">
                    <t indent="0" pn="section-toc.1-1.8.2.2.2.1.1"><xref derivedContent="8.2.1" format="counter" sectionFormat="of" target="section-8.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-desktop-pc-variables">Desktop PC Variables</xref></t>
                  </li>
                  <li pn="section-toc.1-1.8.2.2.2.2">
                    <t indent="0" pn="section-toc.1-1.8.2.2.2.2.1"><xref derivedContent="8.2.2" format="counter" sectionFormat="of" target="section-8.2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-unattended-servers-and-addi">Unattended Servers and Additional Variables</xref></t>
                  </li>
                  <li pn="section-toc.1-1.8.2.2.2.3">
                    <t indent="0" pn="section-toc.1-1.8.2.2.2.3.1"><xref derivedContent="8.2.3" format="counter" sectionFormat="of" target="section-8.2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-commands-and-other-technica">Commands and Other Technical                                                             
Terms</xref></t>
                  </li>
                  <li pn="section-toc.1-1.8.2.2.2.4">
                    <t indent="0" pn="section-toc.1-1.8.2.2.2.4.1"><xref derivedContent="8.2.4" format="counter" sectionFormat="of" target="section-8.2.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-support-for-earlier-version">Support for Earlier Versions</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="9" format="counter" sectionFormat="of" target="section-9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-references">References</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.9.2">
              <li pn="section-toc.1-1.9.2.1">
                <t indent="0" pn="section-toc.1-1.9.2.1.1"><xref derivedContent="9.1" format="counter" sectionFormat="of" target="section-9.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.9.2.2">
                <t indent="0" pn="section-toc.1-1.9.2.2.1"><xref derivedContent="9.2" format="counter" sectionFormat="of" target="section-9.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References </xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.10">
            <t indent="0" pn="section-toc.1-1.10.1"><xref derivedContent="Appendix A" format="default" sectionFormat="of" target="section-appendix.a"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-variables">Variables</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2">
              <li pn="section-toc.1-1.10.2.1">
                <t indent="0" pn="section-toc.1-1.10.2.1.1"><xref derivedContent="A.1" format="counter" sectionFormat="of" target="section-appendix.a.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-typical-ups-variables">Typical UPS Variables</xref></t>
              </li>
              <li pn="section-toc.1-1.10.2.2">
                <t indent="0" pn="section-toc.1-1.10.2.2.1"><xref derivedContent="A.2" format="counter" sectionFormat="of" target="section-appendix.a.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-typical-ups-readable-and-wr">Typical UPS Readable and Writable Variables</xref></t>
              </li>
              <li pn="section-toc.1-1.10.2.3">
                <t indent="0" pn="section-toc.1-1.10.2.3.1"><xref derivedContent="A.3" format="counter" sectionFormat="of" target="section-appendix.a.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-typical-ups-instant-command">Typical UPS Instant Commands</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.11">
            <t indent="0" pn="section-toc.1-1.11.1"><xref derivedContent="Appendix B" format="default" sectionFormat="of" target="section-appendix.b"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-shutdown-story-for-syst">The Shutdown Story for System and UPS</xref></t>
          </li>
          <li pn="section-toc.1-1.12">
            <t indent="0" pn="section-toc.1-1.12.1"><xref derivedContent="Appendix C" format="default" sectionFormat="of" target="section-appendix.c"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-technical-terms-historical-">Technical Terms: Historical Differences</xref></t>
          </li>
          <li pn="section-toc.1-1.13">
            <t indent="0" pn="section-toc.1-1.13.1"><xref derivedContent="Appendix D" format="default" sectionFormat="of" target="section-appendix.d"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-defenses-in-releas">Security Defenses in Release 2.7.4</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.13.2">
              <li pn="section-toc.1-1.13.2.1">
                <t indent="0" pn="section-toc.1-1.13.2.1.1"><xref derivedContent="D.1" format="counter" sectionFormat="of" target="section-appendix.d.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-shims">Shims</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.13.2.1.2">
                  <li pn="section-toc.1-1.13.2.1.2.1">
                    <t indent="0" pn="section-toc.1-1.13.2.1.2.1.1"><xref derivedContent="D.1.1" format="counter" sectionFormat="of" target="section-appendix.d.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-attachment-daemon-shim">Attachment Daemon Shim</xref></t>
                  </li>
                  <li pn="section-toc.1-1.13.2.1.2.2">
                    <t indent="0" pn="section-toc.1-1.13.2.1.2.2.1"><xref derivedContent="D.1.2" format="counter" sectionFormat="of" target="section-appendix.d.1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-management-daemon-shim">Management Daemon Shim</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.13.2.2">
                <t indent="0" pn="section-toc.1-1.13.2.2.1"><xref derivedContent="D.2" format="counter" sectionFormat="of" target="section-appendix.d.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-tls-tunnels">TLS Tunnels</xref></t>
              </li>
              <li pn="section-toc.1-1.13.2.3">
                <t indent="0" pn="section-toc.1-1.13.2.3.1"><xref derivedContent="D.3" format="counter" sectionFormat="of" target="section-appendix.d.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-vpn">VPN</xref></t>
              </li>
              <li pn="section-toc.1-1.13.2.4">
                <t indent="0" pn="section-toc.1-1.13.2.4.1"><xref derivedContent="D.4" format="counter" sectionFormat="of" target="section-appendix.d.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-vlan">VLAN</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.14">
            <t indent="0" pn="section-toc.1-1.14.1"><xref derivedContent="Appendix E" format="default" sectionFormat="of" target="section-appendix.e"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-administrative-security">Administrative Security</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.14.2">
              <li pn="section-toc.1-1.14.2.1">
                <t indent="0" pn="section-toc.1-1.14.2.1.1"><xref derivedContent="E.1" format="counter" sectionFormat="of" target="section-appendix.e.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-management-of-administrativ">Management of Administrative Users</xref></t>
              </li>
              <li pn="section-toc.1-1.14.2.2">
                <t indent="0" pn="section-toc.1-1.14.2.2.1"><xref derivedContent="E.2" format="counter" sectionFormat="of" target="section-appendix.e.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-an-administrative-user-of-a">An Administrative User of a Client Management Daemon</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.14.2.2.2">
                  <li pn="section-toc.1-1.14.2.2.2.1">
                    <t indent="0" pn="section-toc.1-1.14.2.2.2.1.1"><xref derivedContent="E.2.1" format="counter" sectionFormat="of" target="section-appendix.e.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-an-administrative-user-logs">An Administrative User Logs into a Short Session</xref></t>
                  </li>
                  <li pn="section-toc.1-1.14.2.2.2.2">
                    <t indent="0" pn="section-toc.1-1.14.2.2.2.2.1"><xref derivedContent="E.2.2" format="counter" sectionFormat="of" target="section-appendix.e.2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-an-administrative-user-logs-">An Administrative User Logs into a Long Session</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.15">
            <t indent="0" pn="section-toc.1-1.15.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.f"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgments">Acknowledgments</xref></t>
          </li>
          <li pn="section-toc.1-1.16">
            <t indent="0" pn="section-toc.1-1.16.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.g"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-address">Author's Address</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section numbered="true" removeInRFC="false" toc="include" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <section anchor="intro" numbered="true" removeInRFC="false" toc="include" pn="section-1.1">
        <name slugifiedName="name-current-practice">Current Practice</name>
        <t indent="0" pn="section-1.1-1">This document describes UPS management techniques and current UPS
management practice published by the Network UPS Tools (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 indent="0" pn="section-1.1-2">Since May 2002, the protocol described by this document has been
operating on IANA port 3493/TCP (nut).
</t>
        <section anchor="proj" numbered="true" removeInRFC="false" toc="include" pn="section-1.1.1">
          <name slugifiedName="name-nut-project">NUT Project</name>
          <t indent="0" pn="section-1.1.1-1">The primary goal of the Network UPS Tools (NUT)
Project software <xref target="NUT" format="default" sectionFormat="of" derivedContent="NUT"/> is to provide support for power
devices, such as UPSs.  The project has been
in operation since 1998, with a major rework in 2003.  It operates
through a user <xref target="nut-upsuser" format="default" sectionFormat="of" derivedContent="nut-upsuser">mailing list</xref>, a
developer <xref target="nut-upsdev" format="default" sectionFormat="of" derivedContent="nut-upsdev">mailing list</xref>,
a <xref target="NUT" format="default" sectionFormat="of" derivedContent="NUT">website</xref>, and
a <xref target="nut-repository" format="default" sectionFormat="of" derivedContent="nut-repository">GitHub repository</xref>.  See
<xref target="githist" format="default" sectionFormat="of" derivedContent="githist"/> and Appendix J of <xref target="History" format="default" sectionFormat="of" derivedContent="History"/> for
a history of the project.
</t>
        </section>
        <section anchor="TSS" numbered="true" removeInRFC="false" toc="include" pn="section-1.1.2">
          <name slugifiedName="name-the-shutdown-story">The Shutdown Story</name>
          <t indent="0" pn="section-1.1.2-1">The Shutdown Story section (see <xref target="shutdownstory" format="default" sectionFormat="of" derivedContent="Appendix B"/>)
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 minimize the risk of corruption to data
processed by this infrastructure.
</t>
        </section>
        <section anchor="HowtoRead" numbered="true" removeInRFC="false" toc="include" pn="section-1.1.3">
          <name slugifiedName="name-how-to-read-this-document">How to Read this Document</name>
          <t indent="0" pn="section-1.1.3-1">As a simplification to ease reading, 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 indent="0" pn="section-1.1.3-2">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" format="default" sectionFormat="of" derivedContent="Section 5.1"/>, while
the events are listed in
<xref target="events" format="default" sectionFormat="of" derivedContent="Section 5.2"/>.
</t>
          <t indent="0" pn="section-1.1.3-3">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 anchor="AddInf" numbered="true" removeInRFC="false" toc="include" pn="section-1.2">
        <name slugifiedName="name-additional-information">Additional Information</name>
        <t indent="0" pn="section-1.2-1">Additional information about the NUT Project is available in
the <xref target="Documentation" format="default" sectionFormat="of" derivedContent="Documentation">project documentation</xref>.
Requests for further information about this protocol and related
technical matters may be addressed to
the <xref target="nut-upsuser" format="default" sectionFormat="of" derivedContent="nut-upsuser">mailing list</xref> of the NUT Project.
</t>
      </section>
      <section numbered="true" removeInRFC="false" toc="include" pn="section-1.3">
        <name slugifiedName="name-requirements-language">Requirements Language</name>
        <t indent="0" pn="section-1.3-1">
The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> 
when, and only when, they appear in all capitals, as shown here.
</t>
      </section>
    </section>
    <section anchor="Terminology" numbered="true" removeInRFC="false" toc="include" pn="section-2">
      <name slugifiedName="name-terminology">Terminology</name>
      <t indent="0" pn="section-2-1">The following technical terms appear in this document. They are
listed in alphabetical order.
</t>
      <section anchor="au" numbered="true" removeInRFC="false" toc="include" pn="section-2.1">
        <name slugifiedName="name-administrative-user">Administrative User</name>
        <t indent="0" pn="section-2.1-1">In current practice, the commands and other functions offered by
the Attachment Daemon are made available to a set of users known as Management Daemons.  These
Management Daemons authenticate to the Attachment Daemon with basic credentials (username and
password).  Although called "users", the administrative users are not
system users; they are specific to an Attachment Daemon and are listed in a text
file (currently <tt>upsd.users</tt>) that is read by the Attachment Daemon and
that assigns to each of them the password, Instant Commands, and
actions that are allowed, together with the Primary or Secondary
status of the Management Daemon.  For details,
see <xref target="adminuser" format="default" sectionFormat="of" derivedContent="Appendix E.1"/>. For details of the Primary, see
<xref target="prim" format="default" sectionFormat="of" derivedContent="Section 2.7"/>; for details of the Secondary, see <xref target="sec" format="default" sectionFormat="of" derivedContent="Section 2.8"/>.  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" format="default" sectionFormat="of" derivedContent="Appendix E"/>.
</t>
      </section>
      <section anchor="AD" numbered="true" removeInRFC="false" toc="include" pn="section-2.2">
        <name slugifiedName="name-attachment-daemon">Attachment Daemon</name>
        <t indent="0" pn="section-2.2-1">The Attachment Daemon retrieves the 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" format="default" sectionFormat="of" derivedContent="Section 2.3"/>. It
maintains an abstracted view of the hardware through the use of
hardware statuses.  See <xref target="st" format="default" sectionFormat="of" derivedContent="Section 2.10"/>.  A Management Daemon may
consult the abstracted view using the commands described in this
document.
</t>
        <t indent="0" pn="section-2.2-2">See <xref target="MinSup" format="default" sectionFormat="of" derivedContent="Section 8.2"/> 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 indent="0" pn="section-2.2-3">The NUT Project has implemented an Attachment Daemon as program <tt>upsd</tt>
and a set of hardware-specific Drivers, all written in K&amp;R C <xref target="C2ndEd" format="default" sectionFormat="of" derivedContent="C2ndEd"/>.  The
Attachment Daemon is launched as system user "root" but for better security; then, it
drops the privilege to run as a detached software service.
</t>
      </section>
      <section anchor="Driver" numbered="true" removeInRFC="false" toc="include" pn="section-2.3">
        <name slugifiedName="name-driver">Driver</name>
        <t indent="0" pn="section-2.3-1">A Driver is that part of an Attachment Daemon that 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 numbered="true" removeInRFC="false" toc="include" pn="section-2.4">
        <name slugifiedName="name-event">Event</name>
        <t indent="0" pn="section-2.4-1">A UPS event occurs in the Management Daemon when a change in the UPS status is
received from the Attachment Daemon.  This event is internal to the Management Daemon.
See <xref target="events" format="default" sectionFormat="of" derivedContent="Section 5.2"/>.
</t>
      </section>
      <section anchor="IC" numbered="true" removeInRFC="false" toc="include" pn="section-2.5">
        <name slugifiedName="name-instant-command">Instant Command</name>
        <t indent="0" pn="section-2.5-1">An Instant Command is a command that, 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>.
See <xref target="instcmd" format="default" sectionFormat="of" derivedContent="Section 4.2.6"/>.
</t>
      </section>
      <section anchor="MD" numbered="true" removeInRFC="false" toc="include" pn="section-2.6">
        <name slugifiedName="name-management-daemon">Management Daemon</name>
        <t indent="0" pn="section-2.6-1">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" format="default" sectionFormat="of" derivedContent="Appendix B"/>. 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 indent="0" pn="section-2.6-2">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, are
provided by the helper program <tt>upssched</tt>.
</t>
        <t anchor="util" indent="0" pn="section-2.6-3">Other programs represent the Management Daemon:
</t>
        <ul spacing="compact" bare="false" empty="false" indent="3" pn="section-2.6-4">
          <li pn="section-2.6-4.1">
            <tt>upsc</tt> reports the values of the variables defined for a
given UPS; see <xref target="typvar" format="default" sectionFormat="of" derivedContent="Table 6"/>.
</li>
          <li pn="section-2.6-4.2">
            <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" format="default" sectionFormat="of" derivedContent="Appendix A.2"/>.
</li>
          <li pn="section-2.6-4.3">
            <tt>upscmd</tt> reports on and executes the instant action
commands defined for a given UPS; see <xref target="instcmd" format="default" sectionFormat="of" derivedContent="Section 4.2.6"/>.
</li>
          <li pn="section-2.6-4.4">
            <tt>UPSmon.py</tt> is an experimental Python3 rewrite
of <tt>upsmon</tt> and <tt>upssched</tt> that includes support
for <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="RFC8446">TLS 1.3</xref>.
</li>
        </ul>
      </section>
      <section anchor="prim" numbered="true" removeInRFC="false" toc="include" pn="section-2.7">
        <name slugifiedName="name-primary">Primary</name>
        <t indent="0" pn="section-2.7-1">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 <xref target="fig.oview4" format="default" sectionFormat="of" derivedContent="Figure 4"/>.  Common current practice for system administrators is
to consider the Management Daemon in the Primary to be the Primary Management
Daemon that 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>
        <aside pn="section-2.7-2">
          <t indent="0" pn="section-2.7-2.1">Note: Historically, the Primary was known as the "Master".</t>
        </aside>
      </section>
      <section anchor="sec" numbered="true" removeInRFC="false" toc="include" pn="section-2.8">
        <name slugifiedName="name-secondary">Secondary</name>
        <t indent="0" pn="section-2.8-1">When a hardware device, such as a UPS unit, supplies power to more
than one system, the system that communicates directly with the UPS
unit, e.g., using a USB, RS-232, or a network connection, is known as the
Primary.  The others are Secondaries.  There is no Attachment Daemon in a
Secondary. See <xref target="fig.oview4" format="default" sectionFormat="of" derivedContent="Figure 4"/>.
Common current practice for system administrators is to consider the
Management Daemon in a Secondary to be a Secondary Management Daemon that
understands status symbol <tt>FSD</tt> as an order to shut down.
</t>
        <aside pn="section-2.8-2">
          <t indent="0" pn="section-2.8-2.1">Note: Historically, the Secondary was known as the "Slave".</t>
        </aside>
      </section>
      <section anchor="sess" numbered="true" removeInRFC="false" toc="include" pn="section-2.9">
        <name slugifiedName="name-session">Session</name>
        <t indent="0" pn="section-2.9-1">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 password protection for an Instant
Command that 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" numbered="true" removeInRFC="false" toc="include" pn="section-2.10">
        <name slugifiedName="name-ups-status">UPS Status</name>
        <t indent="0" pn="section-2.10-1">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" format="default" sectionFormat="of" derivedContent="Section 5.1"/>, which
specifies each of these symbols.
</t>
        <t indent="0" pn="section-2.10-2">See <xref target="MinSup" format="default" sectionFormat="of" derivedContent="Section 8.2"/> 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" numbered="true" removeInRFC="false" toc="include" pn="section-2.11">
        <name slugifiedName="name-ups-variable">UPS Variable</name>
        <t indent="0" pn="section-2.11-1">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" format="default" sectionFormat="of" derivedContent="Appendix A"/>,
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 indent="0" pn="section-2.11-2">Note: Some variables are constants, e.g., battery type and
manufacturer.
</t>
        <t indent="0" pn="section-2.11-3">See <xref target="MinSup" format="default" sectionFormat="of" derivedContent="Section 8.2"/> for details of the
recommended minimum support of variables.  A full list of possible
variables is available in <xref target="gitvars" format="default" sectionFormat="of" derivedContent="gitvars">source code file
docs/nut-names.txt</xref>, which serves as the Recording Document.
</t>
      </section>
    </section>
    <section anchor="overview" numbered="true" removeInRFC="false" toc="include" pn="section-3">
      <name slugifiedName="name-protocol-overview">Protocol Overview</name>
      <t indent="0" pn="section-3-1"><xref target="fig.oview" format="default" sectionFormat="of" derivedContent="Figure 1"/> 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" align="left" suppress-title="false" pn="figure-1">
        <name slugifiedName="name-reference-configuration">Reference Configuration</name>
        <artwork align="center" type="ascii-art" pn="section-3-2.1">
                                            "The client"
           ,--------------,               ,--------------,
 ,-----,   |     UPS      | &lt;-Commands    |     UPS      |
 | UPS |---|  Attachment  |---------------|  Management  |
 |     |===|    Daemon    |   Responses-&gt; |    Daemon    |
 /-----\   '--------------'               '--------------'
            UPS Attachment                 UPS Management
                System        Network          System
</artwork>
      </figure>
      <t indent="0" pn="section-3-3">The reference configuration in <xref target="fig.oview" format="default" sectionFormat="of" derivedContent="Figure 1"/> shows a single UPS unit that
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 indent="0" pn="section-3-4">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 indent="0" pn="section-3-5">The protocol applies to connections between the Attachment Daemon
and the Management Daemon, which act as the <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 indent="0" pn="section-3-6">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
<xref target="fig.oview2" format="default" sectionFormat="of" derivedContent="Figure 2"/>, 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" align="left" suppress-title="false" pn="figure-2">
        <name slugifiedName="name-simplified-single-system-co">Simplified Single-System Configuration
</name>
        <artwork align="center" type="ascii-art" pn="section-3-7.1">
                                         "The client"
           ,--------------------,---------------------,
 ,-----,   |     UPS       &lt;-Commands        UPS      |
 | UPS |---|  Attachment        |         Management  |
 |     |===|    Daemon       Responses-&gt;    Daemon    |
 /-----\   '--------------------'---------------------'
                             Internal
                             Loopback
             UPS Attachment and Management System
</artwork>
      </figure>
      <t indent="0" pn="section-3-8">The reference configuration does not require any specific
design. For example, <xref target="fig.oview3" format="default" sectionFormat="of" derivedContent="Figure 3"/>
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" align="left" suppress-title="false" pn="figure-3">
        <name slugifiedName="name-ups-and-attachment-daemon-i">UPS and Attachment Daemon Integration
</name>
        <artwork align="center" type="ascii-art" pn="section-3-9.1">
                                      "The client"
 ,-----,------------,               ,--------------,
 |     |    UPS     | &lt;-Commands    |     UPS      |
 | UPS - Attachment |---------------|  Management  |
 |     |   Daemon   |   Responses-&gt; |    Daemon    |
 /-----'------------\               '--------------'
    UPS Attachment                   UPS Management
        System           Network          System
</artwork>
      </figure>
      <t indent="0" pn="section-3-10">As the power requirements for processors decrease, it is becoming
increasingly common to use a single UPS to protect multiple systems, as
shown in <xref target="fig.oview4" format="default" sectionFormat="of" derivedContent="Figure 4"/>.  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. <xref target="fig.oview4" format="default" sectionFormat="of" derivedContent="Figure 4"/> 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" align="left" suppress-title="false" pn="figure-4">
        <name slugifiedName="name-ups-protects-multiple-syste">UPS Protects Multiple Systems
</name>
        <artwork align="center" type="ascii-art" pn="section-3-11.1">
                                      "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 pn="section-3-12">
        <t indent="0" pn="section-3-12.1">Note: Should the Primary fail or go offline, 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" numbered="true" removeInRFC="false" toc="include" pn="section-4">
      <name slugifiedName="name-protocol-specification">Protocol Specification</name>
      <t indent="0" pn="section-4-1">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 indent="0" pn="section-4-2">For example, see <xref target="events" format="default" sectionFormat="of" derivedContent="Section 5.2"/>, 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" numbered="true" removeInRFC="false" toc="include" pn="section-4.1">
        <name slugifiedName="name-notation-used-in-this-speci">Notation Used in this Specification</name>
        <t indent="0" pn="section-4.1-1">The character set used for commands
and responses is US-ASCII; see <xref target="RFC0020" format="default" sectionFormat="of" derivedContent="RFC0020"/>.
</t>
        <t indent="0" pn="section-4.1-2">Multi-word elements are contained between
quotation mark characters for easier parsing, e.g., "UPS on
fire". Embedded quotation marks are escaped with reverse slant (\), often known as backslashes. Embedded
backslashes are also escaped by representing them as \\.
</t>
        <t anchor="onenewline" indent="0" pn="section-4.1-3">Commands and responses have no leading or
trailing blank space and are terminated with a single new
line character line feed (LF).
</t>
        <t indent="0" pn="section-4.1-4">Blank space within commands and responses is reduced to
one space (SP).
</t>
      </section>
      <section anchor="commands" numbered="true" removeInRFC="false" toc="include" pn="section-4.2">
        <name slugifiedName="name-commands">Commands</name>
        <t indent="0" pn="section-4.2-1">The commands address the UPS to which they apply
by <tt>&lt;upsname&gt;</tt>, where</t>
        <ul spacing="compact" bare="false" empty="false" indent="3" pn="section-4.2-2">
          <li pn="section-4.2-2.1">
            <tt>&lt;upsname&gt;</tt>
::= <tt>&lt;ups&gt;[@&lt;hostname&gt;[:&lt;port&gt;]]</tt>
          </li>
          <li pn="section-4.2-2.2">
            <tt>&lt;ups&gt;</tt> is defined by the Attachment Daemon configuration files.
</li>
          <li pn="section-4.2-2.3">The default <tt>&lt;hostname&gt;</tt> is <tt>localhost</tt>.
</li>
          <li pn="section-4.2-2.4">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 indent="0" pn="section-4.2-3">Examples: <tt>myups</tt>, <tt>UPS-97B@bigserver.example.com</tt></t>
        <t indent="0" pn="section-4.2-4">ABNF: See variable <tt>upsname</tt> in <xref target="fig.ABNF" format="default" sectionFormat="of" derivedContent="Figure 5"/>.</t>
        <t indent="0" pn="section-4.2-5">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" bare="false" empty="false" indent="3" pn="section-4.2-6">
          <li pn="section-4.2-6.1">
            <tt>&lt;upsname&gt;</tt> ::= <tt>[&lt;group&gt;:]&lt;ups&gt;[@&lt;hostname&gt;[:&lt;port&gt;]]</tt></li>
          <li pn="section-4.2-6.2">
            <tt>&lt;group&gt;</tt> is an experimental extension to provide for groups of UPSs.  It is not in common current practice.</li>
          <li pn="section-4.2-6.3">
            <tt>&lt;ups&gt;</tt> is defined by the Attachment Daemon configuration files.</li>
          <li pn="section-4.2-6.4">The default <tt>&lt;hostname&gt;</tt> is <tt>localhost</tt>.</li>
        </ul>
        <t indent="0" pn="section-4.2-7">Examples: <tt>ups-1@example.com:3493</tt>, <tt>HB:heartbeat1@example.com:3493</tt>
        </t>
        <aside pn="section-4.2-8">
          <t indent="0" pn="section-4.2-8.1"><em>Implementation note:</em> 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 uppercase.
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>
        </aside>
        <section anchor="attach" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.1">
          <name slugifiedName="name-attach"><tt>ATTACH</tt></name>
          <t indent="0" pn="section-4.2.1-1">In a configuration like the one shown
in <xref target="fig.oview4" format="default" sectionFormat="of" derivedContent="Figure 4"/>, 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 initialized, 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. Additionally, command <tt>DETACH</tt> decrements the count, and a Management Daemon may
read the count at any time using the command <tt>NUMATTACH</tt>.
</t>
          <t indent="0" pn="section-4.2.1-2">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 indent="0" pn="section-4.2.1-3">Command: <tt>ATTACH &lt;upsname&gt;</tt>
          </t>
          <t indent="0" pn="section-4.2.1-4">If the command succeeds, the response is <tt>OK</tt>; otherwise,
see the error responses in <xref target="errorresponses" format="default" sectionFormat="of" derivedContent="Section 4.3.2"/>.
</t>
          <t indent="0" pn="section-4.2.1-5">ABNF: See variable <tt>attach</tt> in <xref target="fig.ABNF" format="default" sectionFormat="of" derivedContent="Figure 5"/>.
</t>
          <aside pn="section-4.2.1-6">
            <t indent="0" pn="section-4.2.1-6.1">Note: Historically, this command was known as <tt>LOGIN</tt>.
However, because <tt>LOGIN</tt> was not the conventional user access to a
shell or program, the name was changed to avoid confusion.</t>
          </aside>
        </section>
        <section anchor="detach" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.2">
          <name slugifiedName="name-detach"><tt>DETACH</tt></name>
          <t indent="0" pn="section-4.2.2-1">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 <em>active</em>.
</t>
          <t indent="0" pn="section-4.2.2-2">Command: <tt>DETACH</tt>
          </t>
          <t indent="0" pn="section-4.2.2-3">If the command succeeds, the response is <tt>OK Goodbye</tt>;
otherwise, see the error responses
in <xref target="errorresponses" format="default" sectionFormat="of" derivedContent="Section 4.3.2"/>.
</t>
          <t indent="0" pn="section-4.2.2-4">ABNF: See variable <tt>detach</tt> in <xref target="fig.ABNF" format="default" sectionFormat="of" derivedContent="Figure 5"/>.
</t>
          <aside pn="section-4.2.2-5">
            <t indent="0" pn="section-4.2.2-5.1">Note: Historically, this command was known as <tt>LOGOUT</tt>.</t>
          </aside>
        </section>
        <section anchor="FSD" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.3">
          <name slugifiedName="name-fsd"><tt>FSD</tt></name>
          <t indent="0" pn="section-4.2.3-1">A Management Daemon that 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 indent="0" pn="section-4.2.3-2">Command: <tt>FSD &lt;upsname&gt;</tt>
          </t>
          <t indent="0" pn="section-4.2.3-3">If the command succeeds, the response is <tt>OK FSD-SET</tt>;
otherwise, see the error responses in <xref target="errorresponses" format="default" sectionFormat="of" derivedContent="Section 4.3.2"/>.
</t>
          <t indent="0" pn="section-4.2.3-4">ABNF: See variable <tt>fsd</tt> in <xref target="fig.ABNF" format="default" sectionFormat="of" derivedContent="Figure 5"/>.
</t>
          <t indent="0" pn="section-4.2.3-5">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" format="default" sectionFormat="of" derivedContent="Appendix E"/>.
</t>
          <t indent="0" pn="section-4.2.3-6">Note: The symbol <tt>FSD</tt> is also used for an event.
See <xref target="EventFSD" format="default" sectionFormat="of" derivedContent="Table 5"/>.
</t>
        </section>
        <section anchor="get" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.4">
          <name slugifiedName="name-get"><tt>GET</tt></name>
          <t indent="0" pn="section-4.2.4-1">Retrieve a single response from the Attachment Daemon.
</t>
          <t indent="0" pn="section-4.2.4-2">ABNF: See variable <tt>get</tt> in <xref target="fig.ABNF" format="default" sectionFormat="of" derivedContent="Figure 5"/>.
</t>
          <t indent="0" pn="section-4.2.4-3">The possible subcommands are listed in the sections below.
</t>
          <section anchor="cmddesc" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.4.1">
            <name slugifiedName="name-get-cmddesc"><tt>GET CMDDESC</tt></name>
            <t indent="0" pn="section-4.2.4.1-1">Retrieve a text description of a command.
</t>
            <t indent="0" pn="section-4.2.4.1-2">Command: <tt>GET CMDDESC &lt;upsname&gt; &lt;cmdname&gt;</tt>
            </t>
            <t indent="0" pn="section-4.2.4.1-3">Response:
<tt>CMDDESC &lt;upsname&gt; &lt;cmdname&gt; "&lt;description&gt;"</tt>
            </t>
            <t indent="0" pn="section-4.2.4.1-4">For example: command <tt>GET CMDDESC su700 load.on</tt> and
response <tt>CMDDESC su700 load.on "Turn on the load immediately"</tt>
            </t>
            <t indent="0" pn="section-4.2.4.1-5">This is like <tt>GET DESC</tt>, but it applies to an Instant Command.
See <xref target="desc" format="default" sectionFormat="of" derivedContent="Section 4.2.4.2"/>.
</t>
          </section>
          <section anchor="desc" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.4.2">
            <name slugifiedName="name-get-desc"><tt>GET DESC</tt></name>
            <t indent="0" pn="section-4.2.4.2-1">Retrieve a text description of a UPS variable.  See <xref target="var" format="default" sectionFormat="of" derivedContent="Section 2.11"/>.
</t>
            <t indent="0" pn="section-4.2.4.2-2">Command: <tt>GET DESC &lt;upsname&gt; &lt;varname&gt;</tt>
            </t>
            <t indent="0" pn="section-4.2.4.2-3">Response: <tt>DESC &lt;upsname&gt; &lt;varname&gt; "&lt;description&gt;"</tt>
            </t>
            <t indent="0" pn="section-4.2.4.2-4"><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 that provides this description is not
installed.
</t>
            <t indent="0" pn="section-4.2.4.2-5">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" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.4.3">
            <name slugifiedName="name-get-numattach"><tt>GET NUMATTACH</tt></name>
            <t indent="0" pn="section-4.2.4.3-1">Retrieve the count kept by the Attachment Daemon of all the <em>active</em>
systems protected by this UPS.
</t>
            <t indent="0" pn="section-4.2.4.3-2">Command: <tt>GET NUMATTACH &lt;upsname&gt;</tt>
            </t>
            <t indent="0" pn="section-4.2.4.3-3">Response: <tt>NUMATTACH &lt;upsname&gt; &lt;value&gt;</tt>
            </t>
            <t indent="0" pn="section-4.2.4.3-4"><tt>&lt;value&gt;</tt> is a count of the Primary and the
number of Secondaries currently powered by this UPS.
</t>
            <t indent="0" pn="section-4.2.4.3-5">For example: command <tt>GET ATTACH su700</tt> and
response <tt>NUMATTACH su700 1</tt>
            </t>
            <t indent="0" pn="section-4.2.4.3-6">This information is needed by the Management Daemon to determine how many
Secondaries are still connected during the system shutdown process.
</t>
            <aside pn="section-4.2.4.3-7">
              <t indent="0" pn="section-4.2.4.3-7.1">Note: Historically, this subcommand 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>
            </aside>
          </section>
          <section anchor="type" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.4.4">
            <name slugifiedName="name-get-type"><tt>GET TYPE</tt></name>
            <t indent="0" pn="section-4.2.4.4-1">Retrieve the type of a UPS variable.  See <xref target="var" format="default" sectionFormat="of" derivedContent="Section 2.11"/>.
</t>
            <t indent="0" pn="section-4.2.4.4-2">Command: <tt>GET TYPE &lt;upsname&gt; &lt;varname&gt;</tt>
            </t>
            <t indent="0" pn="section-4.2.4.4-3">Response: <tt>TYPE &lt;upsname&gt; &lt;varname&gt; &lt;type&gt;...</tt>
            </t>
            <t indent="0" pn="section-4.2.4.4-4"><tt>&lt;type&gt;...</tt> can be one or more of the following
tokens.  Multiple types may be returned.
</t>
            <t indent="0" pn="section-4.2.4.4-5">For example: command <tt>GET TYPE su700 input.transfer.low</tt> and
response <tt>TYPE su700 input.transfer.low ENUM</tt>
            </t>
            <table align="center" pn="table-1">
              <name slugifiedName="name-variable-types">Variable Types</name>
              <thead>
                <tr>
                  <th align="center" colspan="1" rowspan="1">    Type    </th>
                  <th align="center" colspan="1" rowspan="1">Meaning</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td align="left" colspan="1" rowspan="1">RW </td>
                  <td align="left" colspan="1" rowspan="1">This is a read/write variable.  It may be read with
command <tt>GET VAR</tt> (see <xref target="getvar" format="default" sectionFormat="of" derivedContent="Section 4.2.4.6"/>) and set to a different value
with command <tt>SET</tt> (see <xref target="set" format="default" sectionFormat="of" derivedContent="Section 4.2.11"/>).
</td>
                </tr>
                <tr>
                  <td align="left" colspan="1" rowspan="1">ENUM </td>
                  <td align="left" colspan="1" rowspan="1">This is an enumerated type, which supports specific
predetermined values.
</td>
                </tr>
                <tr>
                  <td align="left" colspan="1" rowspan="1">STRING:n </td>
                  <td align="left" colspan="1" rowspan="1">This is a string of maximum
length <tt>n</tt>.
</td>
                </tr>
                <tr>
                  <td align="left" colspan="1" rowspan="1">RANGE </td>
                  <td align="left" colspan="1" rowspan="1">
                    <t indent="0" pn="section-4.2.4.4-6.2.4.2.1">This is a number, either integer or float,
comprised in the range that may be seen with the command <tt>LIST
RANGE</tt> (see <xref target="range" format="default" sectionFormat="of" derivedContent="Section 4.2.7.4"/>).
</t>
                  </td>
                </tr>
                <tr>
                  <td align="left" colspan="1" rowspan="1">NUMBER </td>
                  <td align="left" colspan="1" rowspan="1">This is a single numeric value, either
integer or float.
</td>
                </tr>
              </tbody>
            </table>
            <t indent="0" pn="section-4.2.4.4-7">Notes:
</t>
            <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.2.4.4-8">
              <li pn="section-4.2.4.4-8.1">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 pn="section-4.2.4.4-8.2">Current practice is to represent floating point values using
 a decimal (base 10) 
English-based representation. Hexadecimals, exponents, and commas used as separators for
thousands 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" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.4.5">
            <name slugifiedName="name-get-upsdesc"><tt>GET UPSDESC</tt></name>
            <t indent="0" pn="section-4.2.4.5-1">Retrieve a text description of a UPS.
</t>
            <t indent="0" pn="section-4.2.4.5-2">Command: <tt>GET UPSDESC &lt;upsname&gt;</tt>
            </t>
            <t indent="0" pn="section-4.2.4.5-3">Response: <tt>UPSDESC &lt;upsname&gt; "&lt;description&gt;"</tt>
            </t>
            <t indent="0" pn="section-4.2.4.5-4">&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 indent="0" pn="section-4.2.4.5-5">For example: command <tt>GET UPSDESC su700</tt> and response
<tt>UPSDESC su700 "Development box"</tt>
            </t>
            <t indent="0" pn="section-4.2.4.5-6">This can be used to provide human-readable descriptions, instead of
a cryptic <tt>ups@hostname</tt> string.
</t>
          </section>
          <section anchor="getvar" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.4.6">
            <name slugifiedName="name-get-var"><tt>GET VAR</tt></name>
            <t indent="0" pn="section-4.2.4.6-1">Retrieve the value of a UPS variable.  See <xref target="var" format="default" sectionFormat="of" derivedContent="Section 2.11"/>.
</t>
            <t indent="0" pn="section-4.2.4.6-2">Command: <tt>GET VAR &lt;upsname&gt;
&lt;varname&gt;</tt>
            </t>
            <t indent="0" pn="section-4.2.4.6-3">Response: <tt>VAR &lt;upsname&gt; &lt;varname&gt; "&lt;value&gt;"</tt>
            </t>
            <t indent="0" pn="section-4.2.4.6-4">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" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.5">
          <name slugifiedName="name-help"><tt>HELP</tt></name>
          <t indent="0" pn="section-4.2.5-1">Return a list of the commands supported by the Attachment Daemon.  This command
is intended for human, as well as program, use.
</t>
          <t indent="0" pn="section-4.2.5-2">Command: <tt>HELP</tt>
          </t>
          <t indent="0" pn="section-4.2.5-3">For example: the following command line sequence executed on an
Attachment Daemon</t>
          <sourcecode name="" type="shell" markers="false" pn="section-4.2.5-4">
netcat localhost 3493
HELP
Commands: HELP VER GET LIST SET INSTCMD ATTACH DETACH
    USERNAME PASSWORD STARTTLS
</sourcecode>
          <t indent="0" pn="section-4.2.5-5">ABNF: See variable <tt>help</tt> in <xref target="fig.ABNF" format="default" sectionFormat="of" derivedContent="Figure 5"/>.
</t>
          <aside pn="section-4.2.5-6">
            <t indent="0" pn="section-4.2.5-6.1">Note: Historically, this command also returned <tt>LOGIN</tt>
and <tt>LOGOUT</tt>.  Because <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>
          </aside>
        </section>
        <section anchor="instcmd" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.6">
          <name slugifiedName="name-instcmd"><tt>INSTCMD</tt></name>
          <t indent="0" pn="section-4.2.6-1">Send an Instant Command to the UPS.
</t>
          <t indent="0" pn="section-4.2.6-2">Command: <tt>INSTCMD &lt;upsname&gt; &lt;cmdname&gt;</tt>
          </t>
          <t indent="0" pn="section-4.2.6-3"><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" format="default" sectionFormat="of" derivedContent="Appendix A.3"/> for examples of
Instant Commands.
</t>
          <t indent="0" pn="section-4.2.6-4">If the command succeeds, the response is <tt>OK</tt>; otherwise,
see the error responses in <xref target="errorresponses" format="default" sectionFormat="of" derivedContent="Section 4.3.2"/>.
</t>
          <t indent="0" pn="section-4.2.6-5">For example: command <tt>INSTCMD su700 test.panel.start</tt>
and response <tt>OK</tt>
          </t>
          <t indent="0" pn="section-4.2.6-6">ABNF: See variable <tt>instcmd</tt> in <xref target="fig.ABNF" format="default" sectionFormat="of" derivedContent="Figure 5"/>.
</t>
        </section>
        <section anchor="list" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.7">
          <name slugifiedName="name-list"><tt>LIST</tt></name>
          <t indent="0" pn="section-4.2.7-1">All the <tt>LIST</tt> commands produce a response with a common
format. The response begins with <tt>BEGIN LIST</tt> and then
repeats 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 indent="0" pn="section-4.2.7-2">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 indent="0" pn="section-4.2.7-3">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 indent="0" pn="section-4.2.7-4">ABNF: See the variable <tt>list</tt> in <xref target="fig.ABNF" format="default" sectionFormat="of" derivedContent="Figure 5"/>.
</t>
          <t indent="0" pn="section-4.2.7-5">The possible subcommands are listed in the sections below.
</t>
          <section anchor="client" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.7.1">
            <name slugifiedName="name-list-client"><tt>LIST CLIENT</tt></name>
            <t indent="0" pn="section-4.2.7.1-1">The command calls for the Attachment Daemon to report all the current Management Daemon
clients of a given UPS.
</t>
            <t indent="0" pn="section-4.2.7.1-2">Command: <tt>LIST CLIENT &lt;upsname&gt;</tt>
            </t>
            <t indent="0" pn="section-4.2.7.1-3">Response:
</t>
            <sourcecode name="" type="shell" markers="false" pn="section-4.2.7.1-4">
BEGIN LIST CLIENT &lt;upsname&gt;
CLIENT &lt;upsname&gt; &lt;client_IP_address&gt;
...
END LIST CLIENT &lt;upsname&gt;
</sourcecode>
            <t indent="0" pn="section-4.2.7.1-5">For example: command <tt>LIST CLIENT ups1</tt> and response
</t>
            <sourcecode name="" type="shell" markers="false" pn="section-4.2.7.1-6">
BEGIN LIST CLIENT ups1
CLIENT ups1 ::1
CLIENT ups1 203.0.113.1
END LIST CLIENT ups1
</sourcecode>
          </section>
          <section anchor="cmd" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.7.2">
            <name slugifiedName="name-list-cmd"><tt>LIST CMD</tt></name>
            <t indent="0" pn="section-4.2.7.2-1">The command calls for the Attachment Daemon to report a list of the Instant
Commands that 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 indent="0" pn="section-4.2.7.2-2">Command: <tt>LIST CMD &lt;upsname&gt;</tt>
            </t>
            <t indent="0" pn="section-4.2.7.2-3">Response:</t>
            <sourcecode name="" type="shell" markers="false" pn="section-4.2.7.2-4">
BEGIN LIST CMD &lt;upsname&gt;
CMD &lt;upsname&gt; &lt;cmdname&gt;
...
END LIST CMD &lt;upsname&gt;
</sourcecode>
            <t indent="0" pn="section-4.2.7.2-5"><tt>&lt;upsname&gt;</tt> is the name of the UPS,
and <tt>&lt;cmdname&gt;</tt> is the name of the Instant Command that
may be issued to the UPS.
</t>
            <t indent="0" pn="section-4.2.7.2-6">For example: command <tt>LIST CMD su700</tt> and response
</t>
            <sourcecode name="" type="shell" markers="false" pn="section-4.2.7.2-7">
BEGIN LIST CMD su700
CMD su700 load.on
CMD su700 test.panel.start
...
END LIST CMD su700
</sourcecode>
          </section>
          <section anchor="enum" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.7.3">
            <name slugifiedName="name-list-enum"><tt>LIST ENUM</tt></name>
            <t indent="0" pn="section-4.2.7.3-1">The command calls for the Attachment Daemon to report the set of possible
values of a UPS variable that has predetermined values.
</t>
            <t indent="0" pn="section-4.2.7.3-2">Command: <tt>LIST ENUM &lt;upsname&gt; &lt;varname&gt;</tt>
            </t>
            <t indent="0" pn="section-4.2.7.3-3">Response:</t>
            <sourcecode name="" type="shell" markers="false" pn="section-4.2.7.3-4">
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 indent="0" pn="section-4.2.7.3-5"><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.  Also note that the quotation marks are part of
the response.
</t>
            <t indent="0" pn="section-4.2.7.3-6">For example: command <tt>LIST ENUM su700 input.transfer.low</tt>
and response</t>
            <sourcecode name="" type="shell" markers="false" pn="section-4.2.7.3-7">
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" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.7.4">
            <name slugifiedName="name-list-range"><tt>LIST RANGE</tt></name>
            <t indent="0" pn="section-4.2.7.4-1">The command calls for the Attachment Daemon to report the interval in which
valid values of UPS variable lie.
</t>
            <t indent="0" pn="section-4.2.7.4-2">Command: <tt>LIST RANGE &lt;upsname&gt; &lt;varname&gt;</tt>
            </t>
            <t indent="0" pn="section-4.2.7.4-3">Response:</t>
            <sourcecode name="" type="shell" markers="false" pn="section-4.2.7.4-4">
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 indent="0" pn="section-4.2.7.4-5"><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 quotation
marks are part of the response.
</t>
            <t indent="0" pn="section-4.2.7.4-6">For example: command <tt>LIST RANGE su700
input.transfer.low</tt> and response
</t>
            <sourcecode name="" type="shell" markers="false" pn="section-4.2.7.4-7">
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" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.7.5">
            <name slugifiedName="name-list-rw"><tt>LIST RW</tt></name>
            <t indent="0" pn="section-4.2.7.5-1">The command calls for the Attachment Daemon to report a list of the UPS
variables associated with a given UPS that 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 that
are needed for an automatic shutdown and restart;
see <xref target="shutdownstory" format="default" sectionFormat="of" derivedContent="Appendix B"/>.  Also,
see <xref target="MinSup" format="default" sectionFormat="of" derivedContent="Section 8.2"/> for details of the recommended
minimum support of variables.  A full list of variables is available
in <xref target="gitvars" format="default" sectionFormat="of" derivedContent="gitvars">source code file docs/nut-names.txt</xref>,
which serves as the Recording Document.
</t>
            <t indent="0" pn="section-4.2.7.5-2">Command: <tt>LIST RW &lt;upsname&gt;</tt>
            </t>
            <t indent="0" pn="section-4.2.7.5-3">Response:</t>
            <sourcecode name="" type="shell" markers="false" pn="section-4.2.7.5-4">
BEGIN LIST RW &lt;upsname&gt;
RW &lt;upsname&gt; &lt;varname&gt; "&lt;value&gt;"
...
END LIST RW &lt;upsname&gt;
</sourcecode>
            <t indent="0" pn="section-4.2.7.5-5"><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 quotation marks are part of the response.
</t>
            <t indent="0" pn="section-4.2.7.5-6">For example: command <tt>LIST RW su700</tt> and response
</t>
            <sourcecode name="" type="shell" markers="false" pn="section-4.2.7.5-7">
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" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.7.6">
            <name slugifiedName="name-list-ups"><tt>LIST UPS</tt></name>
            <t indent="0" pn="section-4.2.7.6-1">The command calls for the Attachment Daemon to report a list of the UPS units
to which it is attached.
</t>
            <t indent="0" pn="section-4.2.7.6-2">Command: <tt>LIST UPS</tt>
            </t>
            <t indent="0" pn="section-4.2.7.6-3">Response:</t>
            <sourcecode name="" type="shell" markers="false" pn="section-4.2.7.6-4">
BEGIN LIST UPS
UPS &lt;upsname&gt; "&lt;description&gt;"
...
END LIST UPS
</sourcecode>
            <t indent="0" pn="section-4.2.7.6-5"><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 quotation marks are part of the response.
</t>
            <t indent="0" pn="section-4.2.7.6-6">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 UPSs.  It is also useful for clients
that perform a UPS discovery process.
</t>
            <t indent="0" pn="section-4.2.7.6-7">For example: response
</t>
            <sourcecode name="" type="shell" markers="false" pn="section-4.2.7.6-8">
BEGIN LIST UPS
UPS su700 "Development box"
END LIST UPS
</sourcecode>
          </section>
          <section anchor="listvar" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.7.7">
            <name slugifiedName="name-list-var"><tt>LIST VAR</tt></name>
            <t indent="0" pn="section-4.2.7.7-1">The command calls for the Attachment Daemon to report a list of all the UPS
variables that it maintains for a given UPS and the values of those
UPS variables.
</t>
            <t indent="0" pn="section-4.2.7.7-2">Command: <tt>LIST VAR &lt;upsname&gt;</tt>
            </t>
            <t indent="0" pn="section-4.2.7.7-3">Response:</t>
            <sourcecode name="" type="shell" markers="false" pn="section-4.2.7.7-4">
BEGIN LIST VAR &lt;upsname&gt;
VAR &lt;upsname&gt; &lt;varname&gt; "&lt;value&gt;"
...
END LIST VAR &lt;upsname&gt;
</sourcecode>
            <t indent="0" pn="section-4.2.7.7-5"><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 quotation marks are part of the response.
</t>
            <t indent="0" pn="section-4.2.7.7-6">The response to this command lists the UPS variables available for
this UPS and their current values.</t>
            <t indent="0" pn="section-4.2.7.7-7">For example: command <tt>LIST VAR su700</tt> and response
</t>
            <sourcecode name="" type="shell" markers="false" pn="section-4.2.7.7-8">
BEGIN LIST VAR su700
VAR su700 ups.mfr "Example Mfg"
VAR su700 ups.mfr.date "10/17/96"
...
END LIST VAR su700
</sourcecode>
            <t indent="0" pn="section-4.2.7.7-9">See
<xref target="MinSup" format="default" sectionFormat="of" derivedContent="Section 8.2"/> for details of the recommended minimum
support of variables.  A full list of variables is available
in <xref target="gitvars" format="default" sectionFormat="of" derivedContent="gitvars">source code file docs/nut-names.txt</xref>,
which serves as the Recording Document.
</t>
          </section>
        </section>
        <section anchor="password" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.8">
          <name slugifiedName="name-password"><tt>PASSWORD</tt></name>
          <t indent="0" pn="section-4.2.8-1">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" format="default" sectionFormat="of" derivedContent="Section 2.9"/>.
</t>
          <t indent="0" pn="section-4.2.8-2">Command: <tt>PASSWORD &lt;password&gt;</tt>
          </t>
          <t indent="0" pn="section-4.2.8-3">If the command succeeds, the response is <tt>OK</tt>; otherwise, see
the error responses in <xref target="errorresponses" format="default" sectionFormat="of" derivedContent="Section 4.3.2"/>.
</t>
          <t indent="0" pn="section-4.2.8-4">For examples of the use of commands <tt>USERNAME</tt>
and <tt>PASSWORD</tt> by administrative users,
see <xref target="adsecclient" format="default" sectionFormat="of" derivedContent="Appendix E.2"/>.
</t>
          <t indent="0" pn="section-4.2.8-5">ABNF: See variable <tt>session-password</tt> in <xref target="fig.ABNF" format="default" sectionFormat="of" derivedContent="Figure 5"/>.
</t>
        </section>
        <section anchor="primary" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.9">
          <name slugifiedName="name-primary-2"><tt>PRIMARY</tt></name>
          <t indent="0" pn="section-4.2.9-1">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" format="default" sectionFormat="of" derivedContent="Appendix E.1"/> 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 critical
actions, such as setting status symbol <tt>FSD</tt>.
</t>
          <t indent="0" pn="section-4.2.9-2">Command: <tt>PRIMARY &lt;upsname&gt;</tt>
          </t>
          <t indent="0" pn="section-4.2.9-3"><tt>&lt;upsname&gt;</tt> is the name of the UPS.
</t>
          <t indent="0" pn="section-4.2.9-4">If the Attachment Daemon has the authority, the response is <tt>OK</tt>;
otherwise, see the error
responses in <xref target="errorresponses" format="default" sectionFormat="of" derivedContent="Section 4.3.2"/>.
</t>
          <aside pn="section-4.2.9-5">
            <t indent="0" pn="section-4.2.9-5.1">Note: Historically, this command was known as <tt>MASTER</tt>.</t>
          </aside>
        </section>
        <section anchor="protver" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.10">
          <name slugifiedName="name-protver"><tt>PROTVER</tt></name>
          <t indent="0" pn="section-4.2.10-1">Return the version of the command/response protocol
used by the Attachment Daemon.  This command is intended for human, as well as
program, use.
</t>
          <t indent="0" pn="section-4.2.10-2">Command: <tt>PROTVER</tt>
          </t>
          <t indent="0" pn="section-4.2.10-3">For example: the following command line sequence in the Attachment Daemon
</t>
          <sourcecode name="" type="shell" markers="false" pn="section-4.2.10-4">
netcat localhost 3493
PROTVER
1.3
</sourcecode>
          <t indent="0" pn="section-4.2.10-5">Notes:
</t>
          <ol spacing="compact" indent="adaptive" start="1" type="1" pn="section-4.2.10-6">
<li pn="section-4.2.10-6.1" derivedCounter="1.">There are no quotation marks in the response.
</li>
            <li pn="section-4.2.10-6.2" derivedCounter="2.">The version of the protocol returned by <tt>PROTVER</tt> is
different than the implementation version of the Attachment Daemon returned
by <tt>VER</tt>.
</li>
            <li pn="section-4.2.10-6.3" derivedCounter="3.">To ease migration, NUT version 2.8.0 also supports the
equivalent <tt>NETVER</tt> command used in previous
releases. See <xref target="Version.2.7.4" format="default" sectionFormat="of" derivedContent="Section 8.2.4"/>.
</li>
          </ol>
          <t indent="0" pn="section-4.2.10-7">ABNF: See variable <tt>protver</tt> in <xref target="fig.ABNF" format="default" sectionFormat="of" derivedContent="Figure 5"/>.
</t>
        </section>
        <section anchor="set" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.11">
          <name slugifiedName="name-set"><tt>SET</tt></name>
          <t indent="0" pn="section-4.2.11-1">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 indent="0" pn="section-4.2.11-2">Command: <tt>SET VAR &lt;upsname&gt; &lt;varname&gt;
"&lt;value&gt;"</tt>
          </t>
          <t indent="0" pn="section-4.2.11-3"><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 quotation marks are part of the command.
</t>
          <t indent="0" pn="section-4.2.11-4">If the command succeeds, the response is <tt>OK</tt>; otherwise, see
the error responses in <xref target="errorresponses" format="default" sectionFormat="of" derivedContent="Section 4.3.2"/>.
</t>
          <t indent="0" pn="section-4.2.11-5">For example: command <tt>SET VAR su700 ups.id "My UPS"</tt> and
response <tt>OK</tt>
          </t>
          <t indent="0" pn="section-4.2.11-6">ABNF: See the variable <tt>set</tt> in <xref target="fig.ABNF" format="default" sectionFormat="of" derivedContent="Figure 5"/>.
</t>
        </section>
        <section anchor="starttls" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.12">
          <name slugifiedName="name-starttls"><tt>STARTTLS</tt></name>
          <t indent="0" pn="section-4.2.12-1">The client tells the Attachment Daemon to switch to communication encrypted by
TLS <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="RFC8446"/>.  When the
client receives <tt>OK</tt>, it also switches to TLS encryption.
</t>
          <t indent="0" pn="section-4.2.12-2">Command: <tt>STARTTLS</tt>
          </t>
          <t indent="0" pn="section-4.2.12-3">If the command succeeds, the response is <tt>OK STARTTLS</tt>;
otherwise, see the error responses
in <xref target="errorresponses" format="default" sectionFormat="of" derivedContent="Section 4.3.2"/>.
</t>
          <t indent="0" pn="section-4.2.12-4">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 indent="0" pn="section-4.2.12-5">NUT 2.8.0 supports the encryption of communications between the
Attachment Daemon and the Management Daemon using TLS
1.3 <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="RFC8446"/> with X.509 v3 certificates, as
defined by <xref target="RFC5280" format="default" sectionFormat="of" derivedContent="RFC5280"/> and updates.
See <xref target="AppendixEavesdropping" format="default" sectionFormat="of" derivedContent="Appendix D"/> for details of the
encryption of communications in previous release 2.7.4.
</t>
          <t indent="0" pn="section-4.2.12-6">ABNF: See variable <tt>starttls</tt> in <xref target="fig.ABNF" format="default" sectionFormat="of" derivedContent="Figure 5"/>.
</t>
          <section anchor="selfsigned" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.12.1">
            <name slugifiedName="name-key-infrastructure-and-self">Key Infrastructure and Self-Signed Certificates</name>
            <t indent="0" pn="section-4.2.12.1-1"><em>The very restricted nature of UPS management makes it of
interest to consider self-signed certificates.</em>
            </t>
            <t indent="0" pn="section-4.2.12.1-2">In the World Wide Web, there are millions of servers and hundreds
of millions of potential clients for each one.  The servers do not
know who their clients will be, so they entrust the management of a
Public Key Infrastructure (PKI) to Certificate Authorities that they
trust. The encryption of communications
between the client and server requires that the browsers carry a list of
Certificate Authorities that the clients have to trust.  <em>This is
a many-to-many relationship.</em>
            </t>
            <t indent="0" pn="section-4.2.12.1-3">The management of UPS units is not a many-to-many relationship; it
is frequently one to one.  In the closely restrained world of UPS
management, there are a very limited number of clients for each
server, rarely more than three, and unlike the World Wide Web, the
server administrators know exactly who they are.  These clients visit
very few servers, typically one only.  This situation is totally
different from the World Wide Web.  The use of external Certificate
Authorities is a potential security weakness that must be accepted for
the World Wide Web but which can be avoided for UPS management by
either generating the private and public keys locally or, for larger
organizations, using a PKI.
</t>
            <t indent="0" pn="section-4.2.12.1-4">The security policies for UPS management may be subordinate to an
organization's own internal IT security plans and procedures, possibly
based on <xref target="RFC7030" format="default" sectionFormat="of" derivedContent="RFC7030"/>
and <xref target="RFC8894" format="default" sectionFormat="of" derivedContent="RFC8894"/>, but in simple cases, it is possible
to obtain better security using self-signed certificates.
</t>
          </section>
        </section>
        <section anchor="username" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.13">
          <name slugifiedName="name-username"><tt>USERNAME</tt></name>
          <t indent="0" pn="section-4.2.13-1">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 indent="0" pn="section-4.2.13-2">Command: <tt>USERNAME &lt;username&gt;</tt>
          </t>
          <t indent="0" pn="section-4.2.13-3">If the command succeeds, the response is <tt>OK</tt>; otherwise, see
the error responses in <xref target="errorresponses" format="default" sectionFormat="of" derivedContent="Section 4.3.2"/>.
</t>
          <t indent="0" pn="section-4.2.13-4">For examples of the use of commands <tt>USERNAME</tt> and
<tt>PASSWORD</tt> by administrative users,
see <xref target="adsecclient" format="default" sectionFormat="of" derivedContent="Appendix E.2"/>.
</t>
          <t indent="0" pn="section-4.2.13-5">ABNF: See variable <tt>session-username</tt> in <xref target="fig.ABNF" format="default" sectionFormat="of" derivedContent="Figure 5"/>.
</t>
        </section>
        <section anchor="ver" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.14">
          <name slugifiedName="name-ver"><tt>VER</tt></name>
          <t indent="0" pn="section-4.2.14-1">Return the implementation version of the Attachment Daemon.  This command is
intended for human, as well as program, use.
</t>
          <t indent="0" pn="section-4.2.14-2">Command: <tt>VER</tt>
          </t>
          <t indent="0" pn="section-4.2.14-3">For example: the following command line sequence
</t>
          <sourcecode name="" type="shell" markers="false" pn="section-4.2.14-4">
netcat localhost 3493
VER
Network UPS Tools upsd 2.8.0 - http://www.networkupstools.org/
</sourcecode>
          <t indent="0" pn="section-4.2.14-5">Notes:
</t>
          <ol spacing="compact" indent="adaptive" start="1" type="1" pn="section-4.2.14-6">
<li pn="section-4.2.14-6.1" derivedCounter="1.">There are no quotation marks in the response.
</li>
            <li pn="section-4.2.14-6.2" derivedCounter="2.">The implementation version of the Attachment Daemon returned by VER is
different than the protocol version returned by <tt>PROTVER</tt>.
</li>
          </ol>
          <t indent="0" pn="section-4.2.14-7">ABNF: See variable <tt>ver</tt> in <xref target="fig.ABNF" format="default" sectionFormat="of" derivedContent="Figure 5"/>.
</t>
        </section>
      </section>
      <section anchor="responses" numbered="true" removeInRFC="false" toc="include" pn="section-4.3">
        <name slugifiedName="name-summary-of-responses">Summary of Responses</name>
        <section anchor="success" numbered="true" removeInRFC="false" toc="include" pn="section-4.3.1">
          <name slugifiedName="name-response-when-command-succe">Response When Command Succeeds</name>
          <t indent="0" pn="section-4.3.1-1">If the command succeeds, the response has the following
command-dependent form:
</t>
          <table align="center" pn="table-2">
            <name slugifiedName="name-response-if-command-succeed">Response If Command Succeeds</name>
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Command</th>
                <th align="left" colspan="1" rowspan="1">Response</th>
                <th align="left" colspan="1" rowspan="1">Reference</th>
                <th align="left" colspan="1" rowspan="1">Note</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>ATTACH</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <tt>OK</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="attach" format="default" sectionFormat="of" derivedContent="Section 4.2.1"/></td>
                <td align="left" colspan="1" rowspan="1">Was LOGIN  </td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>DETACH</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <tt>OK Goodbye</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="detach" format="default" sectionFormat="of" derivedContent="Section 4.2.2"/></td>
                <td align="left" colspan="1" rowspan="1">Was LOGOUT         </td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>FSD</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <tt>OK FSD-SET</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="FSD" format="default" sectionFormat="of" derivedContent="Section 4.2.3"/></td>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>GET</tt></td>
                <td align="left" colspan="1" rowspan="1">Subcommand specific</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="get" format="default" sectionFormat="of" derivedContent="Section 4.2.4"/></td>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>HELP</tt></td>
                <td align="left" colspan="1" rowspan="1">List of commands</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="help" format="default" sectionFormat="of" derivedContent="Section 4.2.5"/></td>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>INSTCMD</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <tt>OK</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="instcmd" format="default" sectionFormat="of" derivedContent="Section 4.2.6"/></td>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>LIST</tt></td>
                <td align="left" colspan="1" rowspan="1">Subcommand specific</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="list" format="default" sectionFormat="of" derivedContent="Section 4.2.7"/></td>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>PASSWORD</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <tt>OK</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="password" format="default" sectionFormat="of" derivedContent="Section 4.2.8"/></td>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>PRIMARY</tt> </td>
                <td align="left" colspan="1" rowspan="1">
                  <tt>OK</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="primary" format="default" sectionFormat="of" derivedContent="Section 4.2.9"/></td>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>PROTVER</tt></td>
                <td align="left" colspan="1" rowspan="1">Protocol version</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="protver" format="default" sectionFormat="of" derivedContent="Section 4.2.10"/></td>
                <td align="left" colspan="1" rowspan="1">Was NETVER</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>SET</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <tt>OK</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="set" format="default" sectionFormat="of" derivedContent="Section 4.2.11"/></td>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>STARTTLS</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <tt>OK STARTTLS</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="starttls" format="default" sectionFormat="of" derivedContent="Section 4.2.12"/></td>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>USERNAME</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <tt>OK</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="username" format="default" sectionFormat="of" derivedContent="Section 4.2.13"/></td>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>VER</tt></td>
                <td align="left" colspan="1" rowspan="1">Program version</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="ver" format="default" sectionFormat="of" derivedContent="Section 4.2.14"/></td>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
            </tbody>
          </table>
        </section>
        <section anchor="errorresponses" numbered="true" removeInRFC="false" toc="include" pn="section-4.3.2">
          <name slugifiedName="name-error-responses">Error Responses</name>
          <t indent="0" pn="section-4.3.2-1">Error responses have the following format:
</t>
          <sourcecode name="" type="shell" markers="false" pn="section-4.3.2-2">
ERR &lt;error-name&gt; [&lt;extra&gt;]
</sourcecode>
          <t indent="0" pn="section-4.3.2-3"><tt>&lt;error-name&gt;</tt> is a single word token taken from
the 27 characters A-Z and hyphen
(-). 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 indent="0" pn="section-4.3.2-4">The <tt>&lt;error-name&gt;</tt> may have one of the following
values:
</t>
          <table anchor="errors" align="center" pn="table-3">
            <name slugifiedName="name-error-responses-2">Error Responses</name>
            <thead>
              <tr>
                <th align="center" colspan="1" rowspan="1">    The Error Name Token    
               <br/><tt>&lt;error-name&gt;</tt></th>
                <th align="center" colspan="1" rowspan="1">Meaning</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>ACCESS-DENIED</tt></td>
                <td align="left" colspan="1" rowspan="1">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 align="left" colspan="1" rowspan="1">
                  <tt>ALREADY-ATTACHED</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <t indent="0" pn="section-4.3.2-5.2.2.2.1">The client has already sent a
successful <tt>ATTACH</tt> command for a given UPS and can't do it again.</t>
                </td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>ALREADY-SET-PASSWORD</tt></td>
                <td align="left" colspan="1" rowspan="1">The client has already
supplied a <tt>PASSWORD</tt> and is attempting to repeat the command
in the same session.</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>ALREADY-SET-USERNAME</tt></td>
                <td align="left" colspan="1" rowspan="1">The client has already
supplied a <tt>USERNAME</tt> and is attempting to repeat the command
within the same session.</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>CMD-NOT-SUPPORTED</tt></td>
                <td align="left" colspan="1" rowspan="1">The specified UPS doesn't
support the Instant Command.</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>DATA-STALE</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <t indent="0" pn="section-4.3.2-5.2.6.2.1">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 indent="0" pn="section-4.3.2-5.2.6.2.2">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 align="left" colspan="1" rowspan="1">
                  <tt>DRIVER-NOT-CONNECTED</tt></td>
                <td align="left" colspan="1" rowspan="1">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 align="left" colspan="1" rowspan="1">
                  <tt>FEATURE-NOT-CONFIGURED</tt></td>
                <td align="left" colspan="1" rowspan="1">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 align="left" colspan="1" rowspan="1">
                  <tt>FEATURE-NOT-SUPPORTED</tt></td>
                <td align="left" colspan="1" rowspan="1">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 align="left" colspan="1" rowspan="1">
                  <tt>INSTCMD-FAILED</tt></td>
                <td align="left" colspan="1" rowspan="1">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 align="left" colspan="1" rowspan="1">
                  <tt>INVALID-ARGUMENT</tt></td>
                <td align="left" colspan="1" rowspan="1">The client sent an argument to a
command that 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 that is not valid.</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>INVALID-PASSWORD</tt></td>
                <td align="left" colspan="1" rowspan="1">The client sent a nonvalid
<tt>PASSWORD</tt>.</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>INVALID-USERNAME</tt></td>
                <td align="left" colspan="1" rowspan="1">The client sent a nonvalid
<tt>USERNAME</tt>.</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>INVALID-VALUE</tt></td>
                <td align="left" colspan="1" rowspan="1">The value specified in the request
is not valid. This usually applies to a <tt>SET</tt> of
an <tt>ENUM</tt> type that is using a value not in the list of
allowed values.  See <xref target="enum" format="default" sectionFormat="of" derivedContent="Section 4.2.7.3"/>.</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>PASSWORD-<bcp14>REQUIRED</bcp14></tt></td>
                <td align="left" colspan="1" rowspan="1">The command requires
a <tt>PASSWORD</tt> for authentication, but the client hasn't provided
one.</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>READONLY</tt></td>
                <td align="left" colspan="1" rowspan="1">The requested variable in a <tt>SET</tt>
command is not writable.</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>SET-FAILED</tt></td>
                <td align="left" colspan="1" rowspan="1">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 align="left" colspan="1" rowspan="1">
                  <tt>TLS-ALREADY-ENABLED</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <t indent="0" pn="section-4.3.2-5.2.18.2.1">TLS mode is already enabled
on this connection, so the Attachment Daemon can't start it again.
</t>
                  <t indent="0" pn="section-4.3.2-5.2.18.2.2">Note: Historically, this message was <tt>ALREADY-SSL-MODE.</tt>
                  </t>
                </td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>TLS-NOT-ENABLED</tt></td>
                <td align="left" colspan="1" rowspan="1">
                  <t indent="0" pn="section-4.3.2-5.2.19.2.1">TLS mode is required but has
not yet been enabled on this connection, so the Attachment Daemon can't send
commands.</t>
                  <t indent="0" pn="section-4.3.2-5.2.19.2.2">Note: This message is experimental and not in current common
use.</t>
                </td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>TOO-LONG</tt></td>
                <td align="left" colspan="1" rowspan="1">The requested value in a <tt>SET</tt>
command is too long.</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>UNKNOWN-COMMAND</tt></td>
                <td align="left" colspan="1" rowspan="1">The Attachment Daemon doesn't recognize the
command.</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>UNKNOWN-UPS</tt></td>
                <td align="left" colspan="1" rowspan="1">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 align="left" colspan="1" rowspan="1">
                  <tt>USERNAME-<bcp14>REQUIRED</bcp14></tt></td>
                <td align="left" colspan="1" rowspan="1">The command requires
a <tt>USERNAME</tt> for authentication, but the client hasn't provided
one.</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">
                  <tt>VAR-NOT-SUPPORTED</tt></td>
                <td align="left" colspan="1" rowspan="1">The specified UPS doesn't
support the UPS variable in the command.</td>
              </tr>
            </tbody>
          </table>
          <aside pn="section-4.3.2-6">
            <t indent="0" pn="section-4.3.2-6.1">Note: Historically, this error response was <tt>ALREADY-LOGGED-IN</tt>.</t>
          </aside>
        </section>
      </section>
      <section anchor="ABNF" numbered="true" removeInRFC="false" toc="include" pn="section-4.4">
        <name slugifiedName="name-an-abnf-of-the-commands">An ABNF of the Commands</name>
        <t indent="0" pn="section-4.4-1">This section repeats the syntax of <xref target="commands" format="default" sectionFormat="of" derivedContent="Section 4.2"/>
but in Augmented Backus-Naur Form (ABNF).  It does not define any
additional features.  For further details of each command and the
response, see <xref target="commands" format="default" sectionFormat="of" derivedContent="Section 4.2"/>.
</t>
        <t indent="0" pn="section-4.4-2">The commands may be presented in ABNF
<xref target="RFC5234" format="default" sectionFormat="of" derivedContent="RFC5234"/> <xref target="RFC7405" format="default" sectionFormat="of" derivedContent="RFC7405"/> and
represented using US-ASCII <xref target="RFC0020" format="default" sectionFormat="of" derivedContent="RFC0020"/>.
</t>
        <t indent="0" pn="section-4.4-3">Current practice tolerates mixed-case command names, but it is
<bcp14>RECOMMENDED</bcp14> to use uppercase only for commands.
See <xref target="fig.ABNF" format="default" sectionFormat="of" derivedContent="Figure 5"/>.
</t>
        <figure anchor="fig.ABNF" align="center" suppress-title="false" pn="figure-5">
          <name slugifiedName="name-abnf-for-the-commands">ABNF for the Commands
</name>
          <sourcecode type="abnf" markers="false" pn="section-4.4-4.1">
;-------------------------------------------------------------------
; This grammar is case sensitive. Terminal keywords SHOULD be
; written in uppercase, as shown.
; The following basic rules written with uppercase names are
; taken from RFC 5234, Appendix B.1.
   SP = 1*%x20                  ; At least one SPACE
   LF = %x0A                    ; Linefeed
   DIGIT = %x30-39              ; Digit 0 through 9
   ALPHA =  %x41-5A / %x61-7A   ; A-Z / a-z
   DQUOTE = %x22                ; Double quote "
   VCHAR = %x21-7E              ; Visible (printing) characters
; Additional basic rules needed by this grammar
   LC = %x61-7A                 ; Letter a through z
   DOT = 1%x2E                  ; Exactly one .
   COLON = 1%x3A                ; Exactly one :
   AT = 1%x40                   ; Exactly one @
   SEP = 1"-" / 1"_" / 1"."     ; A single - or _ or .
   JOIN = COLON / AT            ; A single : or @
; Frequently used in this grammar
   cmdname = 1*LC *62(DOT 1*LC) ; E.g., load.off.delay
   upschar = DIGIT / ALPHA / SEP
   ups = 1*ALPHA *62upschar     ; E.g., Example-Mfg-999
   group = ups                  ; E.g., HB  (Not in common use)
   hostname = ups               ; E.g., example.com
   port = 1*5DIGIT              ; E.g., 3493
   upsname = [group COLON] ups [AT hostname [COLON port]]
                                ; Fully Qualified UPS name
                                ; E.g.,
                                ; HB:heartbeat1@example.com:3493
   username = ups               ; E.g., Power-Dept.6
   varname = 1*LC *62( DOT 1*(DIGIT / LC) )
                                ; E.g., outlet.1.status
;-------------------------------------------------------------------
   commandLine = command LF     ; LF is a single %x0A
   command = attach / detach / fsd / get / help / instcmd /
             list / password / primary / protver / set /
             starttls / username / ver
;
   attach  = "ATTACH" SP upsname
;
   detach = "DETACH"
;
   fsd = "FSD" SP upsname
;
   get = "GET" SP getsubcommnd
   getsubcommand = getcmddesc / getdesc / getnumattach /
                   gettype / getupsdesc / getvar
;
   getcmddesc =   "CMDDESC" SP upsname SP cmdname
   getdesc =      "DESC" SP upsname SP varname
   getnumattach = "NUMATTACH" SP upsname
   gettype =      "TYPE" SP upsname SP varname
   getupsdesc =   "UPSDESC" SP upsname
   getvar =       "VAR" SP upsname SP varname
;
   help = "HELP"
;
   instcmd = "INSTCMD" SP upsname SP cmdname
;
   list = "LIST" listsubcommand
   listsubcommand = listclient / listcmd / listenum / listrange /
                    listrw / listups / listvar
;
   listclient = "CLIENT" SP upsname
   listcmd =    "CMD" SP upsname
   listenum =   "ENUM" SP upsname SP varname
   listrange =  "RANGE" SP upsname SP varname
   listrw =     "RW" SP upsname
   listups =    "UPS"
   listvar =    "VAR" SP upsname
;
   session-password = "PASSWORD" SP *63VCHAR
                         ; A sequence of printable characters defined
                         ; in a server configuration file.  Local
                         ; security practices may mandate a minimum
                         ; and maximum number of characters.
;
   primary = "PRIMARY" SP upsname
;
   protver = "PROTVER"
;
   value = *63VCHAR      ; Local practices may limit the choice of
                         ; characters and require non-US-ASCII.
   set = "SET" SP %s"VAR" SP upsname SP varname SP
         DQUOTE value DQUOTE
;
   starttls = "STARTTLS"
;
   session-username = "USERNAME" SP username
;
   ver = "VER"
;-------------------------------------------------------------------
</sourcecode>
        </figure>
        <t indent="0" pn="section-4.4-5">Notes:</t>
        <ol spacing="normal" indent="adaptive" start="1" type="1" pn="section-4.4-6">
<li pn="section-4.4-6.1" derivedCounter="1.">
            <em>Implementation note:</em> The ABNF is written using the
provisions
of <xref target="RFC5234" format="default" sectionFormat="of" derivedContent="RFC5234"/> and <xref target="RFC7405" format="default" sectionFormat="of" derivedContent="RFC7405"/>, which
are <xref target="RFC0020" format="default" sectionFormat="of" derivedContent="RFC0020">US-ASCII based</xref>.</li>
          <li pn="section-4.4-6.2" derivedCounter="2.">The grammar is case sensitive.  The terminal key words <bcp14>SHOULD</bcp14>
be written in uppercase, as specified.</li>
          <li pn="section-4.4-6.3" derivedCounter="3.">The repetition factor in front of an expression has the form
&lt;min&gt;*&lt;max&gt;, where &lt;min&gt; is the minimum number of
repetitions, and &lt;max&gt; is the maximum number.</li>
          <li pn="section-4.4-6.4" derivedCounter="4.">If &lt;min&gt; is omitted, its value is 0.  If &lt;max&gt; is
omitted, its value is infinity.</li>
          <li pn="section-4.4-6.5" derivedCounter="5.">The notation <tt>n*n</tt>, meaning "exactly n copies", may be
written as <tt>n</tt>.</li>
          <li pn="section-4.4-6.6" derivedCounter="6.">Square brackets around an expression mean that the expression is
optional.  This could be written as <tt>0*1</tt>.</li>
        </ol>
        <section anchor="ABNF-resp" numbered="true" removeInRFC="false" toc="include" pn="section-4.4.1">
          <name slugifiedName="name-responses-to-commands">Responses to Commands</name>
          <t indent="0" pn="section-4.4.1-1">The responses to the commands are encoded
in <xref target="RFC0020" format="default" sectionFormat="of" derivedContent="RFC0020">US-ASCII</xref> and fall into two groups:
</t>
          <ol spacing="normal" indent="adaptive" start="1" type="1" pn="section-4.4.1-2">
<li pn="section-4.4.1-2.1" derivedCounter="1.">Short replies to action commands; see <xref target="responses" format="default" sectionFormat="of" derivedContent="Section 4.3"/>.</li>
            <li pn="section-4.4.1-2.2" derivedCounter="2.">Long replies to requests for information.  In this case, the reply
is sent in a sequence of messages. The last message will contain a
line beginning <tt>END LIST</tt> . For
example, see <xref target="client" format="default" sectionFormat="of" derivedContent="Section 4.2.7.1"/>.</li>
          </ol>
        </section>
      </section>
    </section>
    <section numbered="true" removeInRFC="false" toc="include" pn="section-5">
      <name slugifiedName="name-statuses-and-events">Statuses and Events</name>
      <section anchor="symbols" numbered="true" removeInRFC="false" toc="include" pn="section-5.1">
        <name slugifiedName="name-status-symbols">Status Symbols</name>
        <t indent="0" pn="section-5.1-1">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 a response, such as <tt>VAR
su700 ups.status "OB LB"</tt>, to discover changes in the UPS status.
These changes will indicate UPS events.
</t>
        <table align="center" pn="table-4">
          <name slugifiedName="name-ups-status-symbols">UPS Status Symbols</name>
          <thead>
            <tr>
              <th align="center" colspan="1" rowspan="1">Status Symbol </th>
              <th align="center" colspan="1" rowspan="1">Meaning</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>ALARM</tt></td>
              <td align="left" colspan="1" rowspan="1">The UPS reports that it requires intervention.</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>BOOST</tt></td>
              <td align="left" colspan="1" rowspan="1">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 align="left" colspan="1" rowspan="1">
                <tt>BYPASS</tt></td>
              <td align="left" colspan="1" rowspan="1">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 align="left" colspan="1" rowspan="1">
                <tt>CAL</tt></td>
              <td align="left" colspan="1" rowspan="1">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 align="left" colspan="1" rowspan="1">
                <tt>CHRG</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <t indent="0" pn="section-5.1-2.2.5.2.1">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 align="left" colspan="1" rowspan="1">
                <tt>COMM</tt></td>
              <td align="left" colspan="1" rowspan="1">The Attachment Daemon has effective contact with the UPS.</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>DISCHRG</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <t indent="0" pn="section-5.1-2.2.7.2.1">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 align="left" colspan="1" rowspan="1">
                <tt>FSD</tt></td>
              <td align="left" colspan="1" rowspan="1">This "Forced Shutdown" status signals that the final shutdown
sequence has begun.</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>LB</tt></td>
              <td align="left" colspan="1" rowspan="1">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 align="left" colspan="1" rowspan="1">
                <tt>NOCOMM</tt></td>
              <td align="left" colspan="1" rowspan="1">The Attachment Daemon has no effective contact with the UPS.</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>OB</tt></td>
              <td align="left" colspan="1" rowspan="1">On Battery. The UPS is taking energy from its 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 align="left" colspan="1" rowspan="1">
                <tt>OFF</tt></td>
              <td align="left" colspan="1" rowspan="1">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 align="left" colspan="1" rowspan="1">
                <tt>OL</tt></td>
              <td align="left" colspan="1" rowspan="1">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 align="left" colspan="1" rowspan="1">
                <tt>OVER</tt></td>
              <td align="left" colspan="1" rowspan="1">Overloaded. The UPS reports that the load on it is beyond its
normal operating maximum.</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>RB</tt></td>
              <td align="left" colspan="1" rowspan="1">Replace battery. The UPS reports that its battery or batteries should
be replaced.</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>TEST</tt></td>
              <td align="left" colspan="1" rowspan="1">Under test. The UPS is currently undergoing a test that may have
been requested manually or internally.</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>TICK</tt></td>
              <td align="left" colspan="1" rowspan="1">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 align="left" colspan="1" rowspan="1">
                <tt>TOCK</tt></td>
              <td align="left" colspan="1" rowspan="1">Heartbeat. See <tt>TICK</tt></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>TRIM</tt></td>
              <td align="left" colspan="1" rowspan="1">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" numbered="true" removeInRFC="false" toc="include" pn="section-5.2">
        <name slugifiedName="name-events">Events</name>
        <t indent="0" pn="section-5.2-1">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 indent="0" pn="section-5.2-2">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 indent="0" pn="section-5.2-3">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 indent="0" pn="section-5.2-4">Current practice is for the Management Daemon to assign names to certain
events.  These are shown in the table in parentheses.
</t>
        <table align="center" pn="table-5">
          <name slugifiedName="name-event-deduction-from-status">Event Deduction from Status Changes</name>
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Old Status</th>
              <th align="left" colspan="1" rowspan="1">New Status</th>
              <th align="left" colspan="1" rowspan="1">Event</th>
              <th align="left" colspan="1" rowspan="1">    </th>
              <th align="left" colspan="1" rowspan="1">Old Status</th>
              <th align="left" colspan="1" rowspan="1">New Status</th>
              <th align="left" colspan="1" rowspan="1">Event</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">
                <tt>ALARM</tt></td>
              <td align="left" colspan="1" rowspan="1">Alarm on</td>
              <td align="left" colspan="1" rowspan="1">    </td>
              <td align="left" colspan="1" rowspan="1">
                <tt>ALARM</tt></td>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">Alarm off</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">
                <tt>BOOST</tt></td>
              <td align="left" colspan="1" rowspan="1">Boosting voltage</td>
              <td align="left" colspan="1" rowspan="1">    </td>
              <td align="left" colspan="1" rowspan="1">
                <tt>BOOST</tt></td>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">Not boosting</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">
                <tt>BYPASS</tt></td>
              <td align="left" colspan="1" rowspan="1">Bypass on</td>
              <td align="left" colspan="1" rowspan="1">    </td>
              <td align="left" colspan="1" rowspan="1">
                <tt>BYPASS</tt></td>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">Bypass off</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">
                <tt>CAL</tt></td>
              <td align="left" colspan="1" rowspan="1">Calibrating</td>
              <td align="left" colspan="1" rowspan="1">    </td>
              <td align="left" colspan="1" rowspan="1">
                <tt>CAL</tt></td>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">Not calibrating</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">
                <tt>CHRG</tt></td>
              <td align="left" colspan="1" rowspan="1">Charging</td>
              <td align="left" colspan="1" rowspan="1">    </td>
              <td align="left" colspan="1" rowspan="1">
                <tt>CHRG</tt></td>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">Not charging</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">
                <tt>COMM</tt></td>
              <td align="left" colspan="1" rowspan="1">UPS communicating<br/>(event <tt>COMMOK</tt>)</td>
              <td align="left" colspan="1" rowspan="1">    </td>
              <td align="left" colspan="1" rowspan="1">
                <tt>COMM</tt></td>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">See note <xref target="DDD" format="counter" sectionFormat="of" derivedContent="4"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">
                <tt>DISCHRG</tt></td>
              <td align="left" colspan="1" rowspan="1">Discharging</td>
              <td align="left" colspan="1" rowspan="1">    </td>
              <td align="left" colspan="1" rowspan="1">
                <tt>DISCHRG</tt></td>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">Not discharging</td>
            </tr>
            <tr anchor="EventFSD">
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">
                <tt>FSD</tt></td>
              <td align="left" colspan="1" rowspan="1">System shutdown<br/>(events <tt>FSD</tt>, <tt>SHUTDOWN</tt>)</td>
              <td align="left" colspan="1" rowspan="1">    </td>
              <td align="left" colspan="1" rowspan="1">
                <tt>FSD</tt></td>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">Shutdown abandoned.  See note <xref target="AAA" format="counter" sectionFormat="of" derivedContent="1"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">
                <tt>LB</tt></td>
              <td align="left" colspan="1" rowspan="1">Low battery.  See note <xref target="BBB" format="counter" sectionFormat="of" derivedContent="2"/> (event <tt>LOWBATT</tt>)</td>
              <td align="left" colspan="1" rowspan="1">    </td>
              <td align="left" colspan="1" rowspan="1">
                <tt>LB</tt></td>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">Battery not low</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">
                <tt>NOCOMM</tt></td>
              <td align="left" colspan="1" rowspan="1">UPS dead?  See note <xref target="DDD" format="counter" sectionFormat="of" derivedContent="4"/><br/>(events <tt>COMMBAD</tt>, <tt>NOCOMM</tt>)</td>
              <td align="left" colspan="1" rowspan="1">    </td>
              <td align="left" colspan="1" rowspan="1">
                <tt>NOCOMM</tt></td>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">See note <xref target="DDD" format="counter" sectionFormat="of" derivedContent="4"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">
                <tt>OFF</tt></td>
              <td align="left" colspan="1" rowspan="1">UPS turned off</td>
              <td align="left" colspan="1" rowspan="1">    </td>
              <td align="left" colspan="1" rowspan="1">
                <tt>OFF</tt></td>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">UPS not turned off</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>OB</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>OL</tt></td>
              <td align="left" colspan="1" rowspan="1">Receiving power<br/>(event <tt>ONLINE</tt>)</td>
              <td align="left" colspan="1" rowspan="1">    </td>
              <td align="left" colspan="1" rowspan="1">
                <tt>OL</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>OB</tt></td>
              <td align="left" colspan="1" rowspan="1">Power lost<br/>(event <tt>ONBATT</tt>)</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">
                <tt>OVER</tt></td>
              <td align="left" colspan="1" rowspan="1">UPS overloaded</td>
              <td align="left" colspan="1" rowspan="1">    </td>
              <td align="left" colspan="1" rowspan="1">
                <tt>OVER</tt></td>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">Overload gone</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">
                <tt>RB</tt></td>
              <td align="left" colspan="1" rowspan="1">Replace battery<br/>(event <tt>REPLBATT</tt>)</td>
              <td align="left" colspan="1" rowspan="1">    </td>
              <td align="left" colspan="1" rowspan="1">
                <tt>RB</tt></td>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">Replacement canceled</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">
                <tt>TEST</tt></td>
              <td align="left" colspan="1" rowspan="1">Test starts</td>
              <td align="left" colspan="1" rowspan="1">    </td>
              <td align="left" colspan="1" rowspan="1">
                <tt>TEST</tt></td>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">Test finished</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">
                <tt>TICK</tt></td>
              <td align="left" colspan="1" rowspan="1">Heartbeat event.  See note <xref target="CCC" format="counter" sectionFormat="of" derivedContent="3"/> </td>
              <td align="left" colspan="1" rowspan="1">    </td>
              <td align="left" colspan="1" rowspan="1">
                <tt>TICK</tt></td>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">No heartbeat.   See note <xref target="CCC" format="counter" sectionFormat="of" derivedContent="3"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">
                <tt>TOCK</tt></td>
              <td align="left" colspan="1" rowspan="1">Heartbeat event.  See note <xref target="CCC" format="counter" sectionFormat="of" derivedContent="3"/> </td>
              <td align="left" colspan="1" rowspan="1">    </td>
              <td align="left" colspan="1" rowspan="1">
                <tt>TOCK</tt></td>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">No heartbeat.  See note <xref target="CCC" format="counter" sectionFormat="of" derivedContent="3"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">
                <tt>TRIM</tt></td>
              <td align="left" colspan="1" rowspan="1">Trimming voltage</td>
              <td align="left" colspan="1" rowspan="1">    </td>
              <td align="left" colspan="1" rowspan="1">
                <tt>TRIM</tt></td>
              <td align="left" colspan="1" rowspan="1">none</td>
              <td align="left" colspan="1" rowspan="1">Not trimming</td>
            </tr>
          </tbody>
        </table>
        <dl newline="true" spacing="normal" indent="3" pn="section-5.2-6">
          <dt pn="section-5.2-6.1">Notes:</dt>
          <dd pn="section-5.2-6.2">
            <ol spacing="compact" indent="adaptive" start="1" type="1" pn="section-5.2-6.2.1">
<li anchor="AAA" pn="section-5.2-6.2.1.1" derivedCounter="1.">Current practice does not include this event.</li>
              <li anchor="BBB" pn="section-5.2-6.2.1.2" derivedCounter="2.">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" pn="section-5.2-6.2.1.3" derivedCounter="3.">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" pn="section-5.2-6.2.1.4" derivedCounter="4.">Current practice is the following: 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 requested.</li>
            </ol>
          </dd>
        </dl>
      </section>
    </section>
    <section anchor="Sec" numbered="true" removeInRFC="false" toc="include" pn="section-6">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <section anchor="weak" numbered="true" removeInRFC="false" toc="include" pn="section-6.1">
        <name slugifiedName="name-current-general-security-pr">Current General Security Practice</name>
        <t indent="0" pn="section-6.1-1">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 activity, part of site management.  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 like the one shown in
<xref target="fig.weak" format="default" sectionFormat="of" derivedContent="Figure 6"/>, which uses port
3493/TCP (nut) between the two daemons running in the same system.
The traffic is often not encrypted, and when it is encrypted, it uses deprecated
early versions of SSL/TLS.
</t>
        <figure anchor="fig.weak" align="left" suppress-title="false" pn="figure-6">
          <name slugifiedName="name-common-single-system-config">Common Single-System Configuration</name>
          <artwork align="center" type="ascii-art" pn="section-6.1-2.1">
 ,-----,   ,--------------------,---------------------,
 | UPS |---|  Attachment   &lt;-Commands     Management  |
 |     |===|    Daemon       Responses-&gt;    Daemon    |
 /-----\   '--------------------'---------------------'
              Listens on
             port 3493/TCP
             for localhost
</artwork>
        </figure>
        <t indent="0" pn="section-6.1-3">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 like the one shown in
<xref target="fig.weaker" format="default" sectionFormat="of" derivedContent="Figure 7"/>, but it also
exacerbates the security weakness of <xref target="fig.weak" format="default" sectionFormat="of" derivedContent="Figure 6"/>, since the traffic between the daemons is now over an
exposed network.
</t>
        <figure anchor="fig.weaker" align="left" suppress-title="false" pn="figure-7">
          <name slugifiedName="name-integration-of-ups-and-atta">Integration of UPS and Attachment Daemon
</name>
          <artwork align="center" type="ascii-art" pn="section-6.1-4.1">
 ,-----,------------,               ,--------------,
 | UPS - Attachment | &lt;-Commands    |  Management  |
 |     |   Daemon   |   Responses-&gt; |    Daemon    |
 /-----'------------\               '--------------'
         Listens on
        port 3493/TCP
</artwork>
        </figure>
        <t indent="0" pn="section-6.1-5">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" format="default" sectionFormat="of" derivedContent="IEC62351-1">IEC Technical Specification 62351</xref>.
In addition to equipment security, cyber security is now an essential
consideration.
</t>
        <t indent="0" pn="section-6.1-6">Quoting from IEC 62351-1<xref target="IEC62351-1" format="default" sectionFormat="of" derivedContent="IEC62351-1"/>,
Introduction to the standard, clause 5.2.3.5:
</t>
        <blockquote pn="section-6.1-7"> 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 indent="0" pn="section-6.1-8">In IEC 62351-1<xref target="IEC62351-1" format="default" sectionFormat="of" derivedContent="IEC62351-1"/>, clause 5.3.5 lists
typical security attacks: Eavesdropping, Masquerade,
Man-in-the-Middle, Replay, and Resource Exhaustion.
<xref target="RFC3552" format="default" sectionFormat="of" derivedContent="RFC3552"/> adds message insertion/deletion/modification
and denial of service.
</t>
        <t indent="0" pn="section-6.1-9">Let's look more closely at these requirements:
</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.1-10">
          <li pn="section-6.1-10.1">Eavesdropping; see <xref target="Eavesdropping" format="default" sectionFormat="of" derivedContent="Section 6.3.1"/></li>
          <li pn="section-6.1-10.2">Man-in-the-Middle; see <xref target="Man-in-the-Middle" format="default" sectionFormat="of" derivedContent="Section 6.3.2"/></li>
          <li pn="section-6.1-10.3">Masquerade; see <xref target="Masquerade" format="default" sectionFormat="of" derivedContent="Section 6.3.3"/></li>
          <li pn="section-6.1-10.4">Message insertion, deletion, and modification;
see <xref target="Messageidm" format="default" sectionFormat="of" derivedContent="Section 6.3.4"/></li>
          <li pn="section-6.1-10.5">Replay; see <xref target="Replay" format="default" sectionFormat="of" derivedContent="Section 6.3.5"/></li>
          <li pn="section-6.1-10.6">Resource Exhaustion and Denial of Service;
see <xref target="Exhaustion" format="default" sectionFormat="of" derivedContent="Section 6.3.6"/></li>
        </ul>
      </section>
      <section anchor="SecRec" numbered="true" removeInRFC="false" toc="include" pn="section-6.2">
        <name slugifiedName="name-communication-security-requ">Communication Security Requirements</name>
        <t indent="0" pn="section-6.2-1">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
<tt>localhost</tt>:
</t>
        <ol spacing="normal" indent="adaptive" start="1" type="1" pn="section-6.2-2">
<li anchor="should" pn="section-6.2-2.1" derivedCounter="1.">
            <bcp14>SHOULD</bcp14> require and accept command
<tt>STARTTLS</tt>,</li>
          <li anchor="must" pn="section-6.2-2.2" derivedCounter="2.">
            <bcp14>MUST</bcp14> encrypt all communication with a Management Daemon, and</li>
          <li anchor="shall" pn="section-6.2-2.3" derivedCounter="3.">
            <bcp14>SHALL</bcp14> refuse all non-encrypted commands, except
an initial <tt>STARTTLS</tt>.</li>
        </ol>
        <t indent="0" pn="section-6.2-3">Notes:  </t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.2-4">
          <li anchor="note-should" pn="section-6.2-4.1">The <bcp14>SHOULD</bcp14>, rather than <bcp14>MUST</bcp14>,
in <xref target="should" format="default" sectionFormat="of" derivedContent="Section 6.2, Paragraph 2, Item 1"/> above allows system administrators to
enforce secure communication using other techniques that do not
involve the <tt>STARTTLS</tt> command.</li>
          <li pn="section-6.2-4.2">If an Attachment Daemon requires that all commands be encrypted as required by
the <bcp14>MUST</bcp14> in <xref target="must" format="default" sectionFormat="of" derivedContent="Section 6.2, Paragraph 2, Item 2"/> 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 pn="section-6.2-4.3">The <bcp14>SHALL</bcp14> in <xref target="shall" format="default" sectionFormat="of" derivedContent="Section 6.2, Paragraph 2, Item 3"/> 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>
        </ul>
        <t indent="0" pn="section-6.2-5">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" format="default" sectionFormat="of" derivedContent="Section 6.2, Paragraph 4, Item 1"/> above on the use
of <bcp14>SHOULD</bcp14>.
</t>
        <section anchor="certsec" numbered="true" removeInRFC="false" toc="include" pn="section-6.2.1">
          <name slugifiedName="name-certificate-security">Certificate Security</name>
          <t indent="0" pn="section-6.2.1-1">In long-lived installations, such as those found in UPS management,
careful certificate management is essential, whether the certificate
is provided by a Certificate Authority or is a self-signed
certificate. For example, the expiration times of both the 
certificate containing the public key and the signing certificate
should be specified. </t>
        </section>
      </section>
      <section anchor="Attacks" numbered="true" removeInRFC="false" toc="include" pn="section-6.3">
        <name slugifiedName="name-attacks-and-defenses">Attacks and Defenses</name>
        <section anchor="Eavesdropping" numbered="true" removeInRFC="false" toc="include" pn="section-6.3.1">
          <name slugifiedName="name-eavesdropping">Eavesdropping</name>
          <t indent="0" pn="section-6.3.1-1">The defense against eavesdropping is encryption of the commands and
responses passed between the client Management Daemon and server Attachment Daemon.  The protocol
provides command <tt>STARTTLS</tt>, see <xref target="starttls" format="default" sectionFormat="of" derivedContent="Section 4.2.12"/>, 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 indent="0" pn="section-6.3.1-2">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 numbered="true" removeInRFC="false" toc="include" pn="section-6.3.1.1">
            <name slugifiedName="name-misplaced-declarations-requ">Misplaced Declarations Requiring TLS</name>
            <t indent="0" pn="section-6.3.1.1-1">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 indent="0" pn="section-6.3.1.1-2">This weakness may be mitigated with strict firewall rules that
would prevent the rogue client Management Daemon from accessing the Attachment Daemon.
</t>
          </section>
          <section numbered="true" removeInRFC="false" toc="include" pn="section-6.3.1.2">
            <name slugifiedName="name-weak-protection-in-previous">Weak Protection in Previous Version 2.7.4</name>
            <t indent="0" pn="section-6.3.1.2-1">Although version 2.8.0 of NUT supports TLS
1.3 <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="RFC8446"/> with X.509 v3 certificates as
defined by <xref target="RFC5280" format="default" sectionFormat="of" derivedContent="RFC5280"/>, previous version
2.7.4 only supported earlier SSL/TLS versions.  To overcome this
weakness, The following techniques have been used:
</t>
            <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.3.1.2-2">
              <li pn="section-6.3.1.2-2.1">Shims; see <xref target="Shims" format="default" sectionFormat="of" derivedContent="Appendix D.1"/></li>
              <li pn="section-6.3.1.2-2.2">TLS tunnel; see <xref target="TLStunnel" format="default" sectionFormat="of" derivedContent="Appendix D.2"/></li>
              <li pn="section-6.3.1.2-2.3">Virtual Private Network (VPN); see <xref target="VPN" format="default" sectionFormat="of" derivedContent="Appendix D.3"/></li>
              <li pn="section-6.3.1.2-2.4">Virtual Local Area Network (VLAN); see <xref target="VLAN" format="default" sectionFormat="of" derivedContent="Appendix D.4"/></li>
            </ul>
          </section>
        </section>
        <section anchor="Man-in-the-Middle" numbered="true" removeInRFC="false" toc="include" pn="section-6.3.2">
          <name slugifiedName="name-man-in-the-middle">Man-in-the-Middle</name>
          <t indent="0" pn="section-6.3.2-1">The protocol relies on TLS encryption to prevent man-in-the-middle
attacks.  See <xref target="AppendixEavesdropping" format="default" sectionFormat="of" derivedContent="Appendix D"/> for defense
methods used for previous NUT version 2.7.4.
</t>
        </section>
        <section anchor="Masquerade" numbered="true" removeInRFC="false" toc="include" pn="section-6.3.3">
          <name slugifiedName="name-masquerade-attack-agent-ver">Masquerade Attack: Agent Verification</name>
          <t anchor="AgentVerif" indent="0" pn="section-6.3.3-1">The protocol allows a malicious client acting
as a Management Daemon to send command <tt>FSD</tt> to an Attachment Daemon to shut down a
working system and its power supply, as described in The Shutdown
Story section (see <xref target="shutdownstory" format="default" sectionFormat="of" derivedContent="Appendix B"/>).  Similarly, a
malicious client could turn off the UPS power outlets, causing the
system to fail.
</t>
          <t indent="0" pn="section-6.3.3-2">The protocol provides commands <tt>USERNAME</tt> (see <xref target="username" format="default" sectionFormat="of" derivedContent="Section 4.2.13"/>)
and <tt>PASSWORD</tt> (see <xref target="password" format="default" sectionFormat="of" derivedContent="Section 4.2.8"/>), which allow an administrative
user in a Management Daemon to authenticate itself to the Attachment Daemon, as a defense
against masquerade attacks.  The administrative username and password
need protection against local malicious users. This is done by
restricting access to the configuration files.
</t>
        </section>
        <section anchor="Messageidm" numbered="true" removeInRFC="false" toc="include" pn="section-6.3.4">
          <name slugifiedName="name-message-insertion-deletion-">Message Insertion, Deletion, and Modification</name>
          <t indent="0" pn="section-6.3.4-1">The protocol relies on TLS encryption to prevent message insertion,
deletion, and modification attacks.
See <xref target="AppendixEavesdropping" format="default" sectionFormat="of" derivedContent="Appendix D"/> for defense methods
used for previous NUT version 2.7.4.
</t>
        </section>
        <section anchor="Replay" numbered="true" removeInRFC="false" toc="include" pn="section-6.3.5">
          <name slugifiedName="name-replay">Replay</name>
          <t indent="0" pn="section-6.3.5-1">There are two cases:
</t>
          <ol spacing="normal" indent="adaptive" start="1" type="1" pn="section-6.3.5-2">
<li pn="section-6.3.5-2.1" derivedCounter="1.">The replay is from a system other than an approved Management Daemon, i.e.,
the protocol relies on a firewall to block the traffic. </li>
            <li pn="section-6.3.5-2.2" derivedCounter="2.">The replay is from an approved Management Daemon. i.e., the protocol relies on the
Management Daemon's own security to prevent unauthorized access.</li>
          </ol>
        </section>
        <section anchor="Exhaustion" numbered="true" removeInRFC="false" toc="include" pn="section-6.3.6">
          <name slugifiedName="name-denial-of-service">Denial of Service</name>
          <t indent="0" pn="section-6.3.6-1">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 numbered="true" removeInRFC="false" toc="include" pn="section-7">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <t indent="0" pn="section-7-1">The protocol specified by this text runs over port 3493/TCP (nut), which is
registered by the Network UPS Tools (NUT) Project.
</t>
      <t indent="0" pn="section-7-2">This document has been added to the registration's Reference field in the 
"Service Name and Transport Protocol Port Number Registry" <xref target="Registry" format="default" sectionFormat="of" derivedContent="Registry"/>.
</t>
    </section>
    <section anchor="implementation" numbered="true" removeInRFC="false" toc="include" pn="section-8">
      <name slugifiedName="name-implementation-status">Implementation Status</name>
      <t indent="0" pn="section-8-1">This section presents a very short summary of the status of the                             
Network UPS Tools project.                                                                     
</t>
      <ul anchor="vsh" spacing="compact" bare="false" empty="false" indent="3" pn="section-8-2">
        <li pn="section-8-2.1">May 1996: The first hack as a cron job.</li>
        <li pn="section-8-2.2">September 1997: The first server-client code.</li>
        <li pn="section-8-2.3">March 1998: First public release.</li>
        <li pn="section-8-2.4">June 1999: Code rewrite with a UPS Driver <tt>smartups</tt>, an                            
Attachment Daemon <tt>upsd</tt>, and a simple Management Daemon.</li>
        <li pn="section-8-2.5">September 1999: The project became "Network UPS Tools".  The                               
Management Daemon <tt>upsmon</tt> supported Primary/Secondary configurations.</li>
        <li pn="section-8-2.6">June 2001: Common core for multiple Drivers.</li>
        <li pn="section-8-2.7">May 2002: IANA granted port 3493/TCP (nut). August: release                                
1.0.0. November: OpenSSL support.</li>
        <li pn="section-8-2.8">April 2003: The initial set of command and variable names was                              
designed.</li>
        <li anchor="arno" pn="section-8-2.9">February 2005: Arnaud Quette took over the project                           
lead from Russell Kroll.</li>
        <li pn="section-8-2.10">March 2016: Version 2.7.4 released, supported over 100 device                              
manufacturers and hundreds of UPS models.</li>
        <li pn="section-8-2.11">November 2020: Evgeny "Jim" Klimov took over project lead from                             
Arnaud Quette.</li>
        <li pn="section-8-2.12">May 2022: Version 2.8.0 released, supporting protocol version                              
1.3.</li>
      </ul>
      <t indent="0" pn="section-8-3">See <xref target="githist" format="default" sectionFormat="of" derivedContent="githist"/>                                                          
and Appendix J <xref target="History" format="default" sectionFormat="of" derivedContent="History"/> for a detailed history of the                    
NUT Project.                                                                                   
</t>
      <section numbered="true" removeInRFC="false" toc="include" pn="section-8.1">
        <name slugifiedName="name-inclusion-in-software-distr">Inclusion in Software Distributions</name>
        <t indent="0" pn="section-8.1-1">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, i.e., 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" numbered="true" removeInRFC="false" toc="include" pn="section-8.2">
        <name slugifiedName="name-recommended-minimum-support">Recommended Minimum Support</name>
        <t indent="0" pn="section-8.2-1">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" format="default" sectionFormat="of" derivedContent="gitvars">source code file                                           
docs/nut-names.txt</xref>, which serves as the Recording Document.                             
</t>
        <section anchor="MinSupPC" numbered="true" removeInRFC="false" toc="include" pn="section-8.2.1">
          <name slugifiedName="name-desktop-pc-variables">Desktop PC Variables</name>
          <t indent="0" pn="section-8.2.1-1">The following variables form a minimum set suitable for a 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 spacing="normal" bare="false" empty="false" indent="3" pn="section-8.2.1-2">
            <li pn="section-8.2.1-2.1">
              <tt>battery.charge</tt></li>
            <li pn="section-8.2.1-2.2">
              <tt>battery.charge.low</tt></li>
            <li pn="section-8.2.1-2.3">
              <tt>device.mfr</tt></li>
            <li pn="section-8.2.1-2.4">
              <tt>device.model</tt></li>
            <li pn="section-8.2.1-2.5">
              <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" format="default" sectionFormat="of" derivedContent="Section 5.1"/></li>
          </ul>
        </section>
        <section anchor="MinSupServer" numbered="true" removeInRFC="false" toc="include" pn="section-8.2.2">
          <name slugifiedName="name-unattended-servers-and-addi">Unattended Servers and Additional Variables</name>
          <t indent="0" pn="section-8.2.2-1">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 spacing="normal" bare="false" empty="false" indent="3" pn="section-8.2.2-2">
            <li pn="section-8.2.2-2.1">
              <tt>battery.date</tt></li>
            <li pn="section-8.2.2-2.2">
              <tt>device.serial</tt></li>
            <li pn="section-8.2.2-2.3">
              <tt>ups.delay.shutdown</tt></li>
            <li pn="section-8.2.2-2.4">
              <tt>ups.delay.start</tt></li>
          </ul>
        </section>
        <section anchor="MinSupCommands" numbered="true" removeInRFC="false" toc="include" pn="section-8.2.3">
          <name slugifiedName="name-commands-and-other-technica">Commands and Other Technical                                                             
Terms</name>
          <t indent="0" pn="section-8.2.3-1">Satisfactory use of the NUT Project software requires support for                           
all the commands specified in protocol version 1.3, software version                           
2.8.0.                                                                                         
</t>
        </section>
        <section anchor="Version.2.7.4" numbered="true" removeInRFC="false" toc="include" pn="section-8.2.4">
          <name slugifiedName="name-support-for-earlier-version">Support for Earlier Versions</name>
          <t indent="0" pn="section-8.2.4-1">In order to ease migration from software version 2.7.4, which                               
supported protocol version 1.2, software version 2.8.0 also supports                           
the technical terms used in protocol version 1.2.                                              
See <xref target="differences" format="default" sectionFormat="of" derivedContent="Appendix C"/> for the differences.                                    
</t>
        </section>
      </section>
    </section>
  </middle>
  <back>
    <references pn="section-9">
      <name slugifiedName="name-references">References</name>
      <references pn="section-9.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <reference anchor="RFC0020" target="https://www.rfc-editor.org/info/rfc20" quoteTitle="true" derivedAnchor="RFC0020">
          <front>
            <title>ASCII format for network interchange</title>
            <author initials="V." surname="Cerf" fullname="V. Cerf">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="1969" month="October"/>
          </front>
          <seriesInfo name="STD" value="80"/>
          <seriesInfo name="RFC" value="20"/>
          <seriesInfo name="DOI" value="10.17487/RFC0020"/>
        </reference>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S" surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t indent="0">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>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC5234" target="https://www.rfc-editor.org/info/rfc5234" quoteTitle="true" derivedAnchor="RFC5234">
          <front>
            <title>Augmented BNF for Syntax Specifications: ABNF</title>
            <author fullname="D. Crocker" initials="D" role="editor" surname="Crocker"/>
            <author fullname="P. Overell" initials="P" surname="Overell"/>
            <date month="January" year="2008"/>
            <abstract>
              <t indent="0">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" quoteTitle="true" derivedAnchor="RFC7405">
          <front>
            <title>Case-Sensitive String Support in ABNF</title>
            <author fullname="P. Kyzivat" initials="P" surname="Kyzivat"/>
            <date month="December" year="2014"/>
            <abstract>
              <t indent="0">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" quoteTitle="true" derivedAnchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B" surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t indent="0">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>
      </references>
      <references pn="section-9.2">
        <name slugifiedName="name-informative-references">Informative References </name>
        <reference anchor="C2ndEd" target="" quoteTitle="true" derivedAnchor="C2ndEd">
          <front>
            <title>The C Programming Language</title>
            <author initials="B" surname="Kernighan" fullname="Brian W. Kernighan"/>
            <author initials="D" surname="Ritchie" fullname="Dennis M. Ritchie"/>
            <date year="1988"/>
          </front>
          <seriesInfo name="ISBN" value="0-13-110362-8"/>
          <refcontent>2nd edition, Prentice Hall Software Series</refcontent>
        </reference>
        <reference anchor="devguide" target="https://networkupstools.org/docs/developer-guide.chunked/ar01s09.html" quoteTitle="true" derivedAnchor="devguide">
          <front>
            <title>Network UPS Tools Project Developer Guide</title>
            <author initials="R" surname="Kroll" fullname="Russell Kroll">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="A" surname="Quette" fullname="Arnaud Quette">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="C" surname="Lepple" fullname="Charles Lepple">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="P" surname="Selinger" fullname="Peter Selinger">
              <organization showOnFrontPage="true"/>
            </author>
          </front>
        </reference>
        <reference anchor="Documentation" target="https://networkupstools.org/documentation.html" quoteTitle="true" derivedAnchor="Documentation">
          <front>
            <title>Network UPS Tools Documentation</title>
            <author/>
          </front>
        </reference>
        <reference anchor="githist" target="https://github.com/networkupstools/nut/blob/master/docs/history.txt" quoteTitle="true" derivedAnchor="githist">
          <front>
            <title>The Network UPS Tools repository, project history</title>
            <author/>
            <date month="July" year="2022"/>
          </front>
        </reference>
        <reference anchor="gitvars" target="https://github.com/networkupstools/nut/blob/master/docs/nut-names.txt" quoteTitle="true" derivedAnchor="gitvars">
          <front>
            <title>The Network UPS Tools repository, variable names</title>
            <author/>
            <date month="April" year="2022"/>
          </front>
        </reference>
        <reference anchor="History" target="https://networkupstools.org/docs/user-manual.pdf" quoteTitle="true" derivedAnchor="History">
          <front>
            <title>Network UPS Tools User Manual</title>
            <author initials="R" surname="Kroll" fullname="Russell Kroll"/>
            <author initials="A" surname="Quette" fullname="Arnaud Quette"/>
            <author initials="A" surname="de Korte" fullname="Arjen de Korte"/>
            <date month="May" year="2022"/>
          </front>
        </reference>
        <reference anchor="HyTimeA" quoteTitle="true" derivedAnchor="HyTimeA">
          <front>
            <title>Information technology -- Hypermedia/Time-based Structuring Language (HyTime)</title>
            <author>
              <organization showOnFrontPage="true">ISO/IEC</organization>
            </author>
            <date month="August" year="1997"/>
          </front>
          <seriesInfo name="ISO/IEC" value="10744:1997"/>
        </reference>
        <reference anchor="IEC62351-1" target="https://nanopdf.com/download/technical-iec-specification-ts-62351-1_pdf" quoteTitle="true" derivedAnchor="IEC62351-1">
          <front>
            <title>Power systems management and associated information exchange -- Data and communications security.  Part 1: Communication network and system security -- Introduction to security issues</title>
            <author>
              <organization showOnFrontPage="true">IEC</organization>
            </author>
            <date month="May" year="2007"/>
          </front>
          <seriesInfo name="IEC" value="TS 62351-1:2007"/>
          <refcontent>35 pages, TC 57 - Power systems management and associated information exchange</refcontent>
        </reference>
        <reference anchor="Library" target="https://networkupstools.org/ddl/" quoteTitle="true" derivedAnchor="Library">
          <front>
            <title>Devices Dumps Library</title>
            <author/>
          </front>
        </reference>
        <reference anchor="NUT" target="https://www.networkupstools.org" quoteTitle="true" derivedAnchor="NUT">
          <front>
            <title>Network UPS Tools, Devices Dumps Library</title>
            <author>
              <organization showOnFrontPage="true"/>
            </author>
          </front>
        </reference>
        <reference anchor="nut-repository" target="https://github.com/networkupstools/nut/" quoteTitle="true" derivedAnchor="nut-repository">
          <front>
            <title>The Network UPS Tools repository</title>
            <author>
              <organization showOnFrontPage="true"/>
            </author>
          </front>
        </reference>
        <reference anchor="nut-upsdev" target="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev" quoteTitle="true" derivedAnchor="nut-upsdev">
          <front>
            <title>Network UPS Tools (NUT) Project Mailing List for Developers</title>
            <author>
              <organization showOnFrontPage="true">NUT</organization>
            </author>
          </front>
        </reference>
        <reference anchor="nut-upsuser" target="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser" quoteTitle="true" derivedAnchor="nut-upsuser">
          <front>
            <title>Network UPS Tools (NUT) Project Mailing List for Users</title>
            <author>
              <organization showOnFrontPage="true">NUT</organization>
            </author>
          </front>
        </reference>
        <reference anchor="Registry" target="https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml" quoteTitle="true" derivedAnchor="Registry">
          <front>
            <title>Service Name and Transport Protocol Port Number Registry</title>
            <author>
              <organization showOnFrontPage="true">IANA</organization>
            </author>
          </front>
        </reference>
        <reference anchor="RFC3552" target="https://www.rfc-editor.org/info/rfc3552" quoteTitle="true" derivedAnchor="RFC3552">
          <front>
            <title>Guidelines for Writing RFC Text on Security Considerations</title>
            <author fullname="E. Rescorla" initials="E" surname="Rescorla"/>
            <author fullname="B. Korver" initials="B" surname="Korver"/>
            <date month="July" year="2003"/>
            <abstract>
              <t indent="0">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 anchor="RFC5280" target="https://www.rfc-editor.org/info/rfc5280" quoteTitle="true" derivedAnchor="RFC5280">
          <front>
            <title>Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile</title>
            <author fullname="D. Cooper" initials="D" surname="Cooper"/>
            <author fullname="S. Santesson" initials="S" surname="Santesson"/>
            <author fullname="S. Farrell" initials="S" surname="Farrell"/>
            <author fullname="S. Boeyen" initials="S" surname="Boeyen"/>
            <author fullname="R. Housley" initials="R" surname="Housley"/>
            <author fullname="W. Polk" initials="W" surname="Polk"/>
            <date month="May" year="2008"/>
            <abstract>
              <t indent="0">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="RFC7030" target="https://www.rfc-editor.org/info/rfc7030" quoteTitle="true" derivedAnchor="RFC7030">
          <front>
            <title>Enrollment over Secure Transport</title>
            <author fullname="M. Pritikin" initials="M" role="editor" surname="Pritikin"/>
            <author fullname="P. Yee" initials="P" role="editor" surname="Yee"/>
            <author fullname="D. Harkins" initials="D" role="editor" surname="Harkins"/>
            <date month="October" year="2013"/>
            <abstract>
              <t indent="0">This document profiles certificate enrollment for clients using Certificate Management over CMS (CMC) messages over a secure transport.  This profile, called Enrollment over Secure Transport (EST), describes a simple, yet functional, certificate management protocol targeting Public Key Infrastructure (PKI) clients that need to acquire client certificates and associated Certification Authority (CA) certificates.  It also supports client-generated public/private key pairs as well as key pairs generated by the CA.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7030"/>
          <seriesInfo name="DOI" value="10.17487/RFC7030"/>
        </reference>
        <reference anchor="RFC7991" target="https://www.rfc-editor.org/info/rfc7991" quoteTitle="true" derivedAnchor="RFC7991">
          <front>
            <title>The "xml2rfc" Version 3 Vocabulary</title>
            <author fullname="P. Hoffman" initials="P" surname="Hoffman"/>
            <date month="December" year="2016"/>
            <abstract>
              <t indent="0">This document defines the "xml2rfc" version 3 vocabulary: an XML-based language used for writing RFCs and Internet-Drafts.  It is heavily derived from the version 2 vocabulary that is also under discussion.  This document obsoletes the v2 grammar described in RFC 7749.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7991"/>
          <seriesInfo name="DOI" value="10.17487/RFC7991"/>
        </reference>
        <reference anchor="RFC8446" target="https://www.rfc-editor.org/info/rfc8446" quoteTitle="true" derivedAnchor="RFC8446">
          <front>
            <title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
            <author fullname="E. Rescorla" initials="E" surname="Rescorla"/>
            <date month="August" year="2018"/>
            <abstract>
              <t indent="0">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 indent="0">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="RFC8894" target="https://www.rfc-editor.org/info/rfc8894" quoteTitle="true" derivedAnchor="RFC8894">
          <front>
            <title>Simple Certificate Enrolment Protocol</title>
            <author fullname="P. Gutmann" initials="P" surname="Gutmann"/>
            <date month="September" year="2020"/>
            <abstract>
              <t indent="0">This document specifies the Simple Certificate Enrolment Protocol (SCEP), a PKI protocol that leverages existing technology by using Cryptographic Message Syntax (CMS, formerly known as PKCS #7) and PKCS #10 over HTTP.  SCEP is the evolution of the enrolment protocol sponsored by Cisco Systems, which enjoys wide support in both client and server implementations, as well as being relied upon by numerous other industry standards that work with certificates.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8894"/>
          <seriesInfo name="DOI" value="10.17487/RFC8894"/>
        </reference>
        <reference anchor="SGML" quoteTitle="true" derivedAnchor="SGML">
          <front>
            <title>The SGML Handbook</title>
            <author initials="C." surname="Goldfarb" fullname="Charles F. Goldfarb">
</author>
            <date year="1990"/>
          </front>
          <seriesInfo name="ISBN-10" value="0-19-853737-9"/>
          <refcontent>Oxford University Press</refcontent>
        </reference>
        <reference anchor="sgmlnorm" target="http://openjade.sourceforge.net/" quoteTitle="true" derivedAnchor="sgmlnorm">
          <front>
            <title>OpenJade Distribution Page</title>
            <author>
              <organization showOnFrontPage="true">OpenJade Project</organization>
            </author>
          </front>
        </reference>
        <reference anchor="stunnel" target="https://www.stunnel.org/" quoteTitle="true" derivedAnchor="stunnel">
          <front>
            <title>Stunnel</title>
            <author/>
          </front>
        </reference>
      </references>
    </references>
    <section anchor="Annex1" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a">
      <name slugifiedName="name-variables">Variables</name>
      <t indent="0" pn="section-appendix.a-1">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" format="default" sectionFormat="of" derivedContent="Section 2.5"/>.  The full set of variables is recorded
in the <xref target="gitvars" format="default" sectionFormat="of" derivedContent="gitvars">reference document for variable
names</xref>.
</t>
      <t indent="0" pn="section-appendix.a-2">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" format="default" sectionFormat="of" derivedContent="Library">large
library of the variable subsets</xref> used by different UPS models.
</t>
      <t indent="0" pn="section-appendix.a-3">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 indent="0" pn="section-appendix.a-4">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" format="default" sectionFormat="of" derivedContent="Section 2.6, Paragraph 3"/>.
</t>
      <t indent="0" pn="section-appendix.a-5">The following sections illustrate the use of variables by taking
the values associated with a typical product.  The example is a 1600 Va
1000 W UPS.
</t>
      <section numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.1">
        <name slugifiedName="name-typical-ups-variables">Typical UPS Variables</name>
        <table anchor="typvar" align="center" pn="table-6">
          <name slugifiedName="name-typical-ups-variables-2">Typical UPS Variables</name>
          <thead>
            <tr>
              <th align="center" colspan="1" rowspan="1">Variable</th>
              <th align="center" colspan="1" rowspan="1">Typical Value</th>
              <th align="center" colspan="1" rowspan="1">Default Description</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>battery.charge</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>100</tt></td>
              <td align="left" colspan="1" rowspan="1">"Battery charge (percent of full)"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>battery.charge.low</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>20</tt></td>
              <td align="left" colspan="1" rowspan="1">"Remaining battery level when UPS switches to LB (percent)"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>battery.runtime</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>1481</tt></td>
              <td align="left" colspan="1" rowspan="1">"Battery runtime (seconds)"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>battery.type</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>PbAc</tt></td>
              <td align="left" colspan="1" rowspan="1">"Battery chemistry"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>device.mfr</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>Example Mfg</tt></td>
              <td align="left" colspan="1" rowspan="1">""</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>device.model</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>Economy 1600</tt></td>
              <td align="left" colspan="1" rowspan="1">""</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>device.serial</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>1234567890</tt></td>
              <td align="left" colspan="1" rowspan="1">""</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>device.type</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>ups</tt></td>
              <td align="left" colspan="1" rowspan="1">""</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>driver.name</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>usbhid-ups</tt></td>
              <td align="left" colspan="1" rowspan="1">"Driver name"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>driver.parameter.lowbatt</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>37</tt></td>
              <td align="left" colspan="1" rowspan="1">"Driver parameter: &lt;name&gt;"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>driver.parameter.offdelay</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>30</tt></td>
              <td align="left" colspan="1" rowspan="1">"Driver parameter: &lt;name&gt;"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>driver.parameter.ondelay</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>40</tt></td>
              <td align="left" colspan="1" rowspan="1">"Driver parameter: &lt;name&gt;"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>driver.parameter.pollfreq</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>30</tt></td>
              <td align="left" colspan="1" rowspan="1">"Driver parameter: &lt;name&gt;"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>driver.parameter.pollinterval</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>2</tt></td>
              <td align="left" colspan="1" rowspan="1">"Driver parameter: &lt;name&gt;"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>driver.parameter.port</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>auto</tt></td>
              <td align="left" colspan="1" rowspan="1">"Driver parameter: &lt;name&gt;"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>driver.parameter.synchronous</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>no</tt></td>
              <td align="left" colspan="1" rowspan="1">"Driver parameter: &lt;name&gt;"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>driver.parameter.vendorid</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>0999</tt></td>
              <td align="left" colspan="1" rowspan="1">"Driver parameter: &lt;name&gt;"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>driver.version</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>2.8.0</tt></td>
              <td align="left" colspan="1" rowspan="1">"Driver version - NUT release"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>driver.version.data</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>HID 1.39</tt></td>
              <td align="left" colspan="1" rowspan="1">""</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>driver.version.internal</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>0.41</tt></td>
              <td align="left" colspan="1" rowspan="1">"Internal driver version"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>input.transfer.high</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>264</tt></td>
              <td align="left" colspan="1" rowspan="1">"High voltage transfer point (V)"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>input.transfer.low</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>184</tt></td>
              <td align="left" colspan="1" rowspan="1">"Low voltage transfer point (V)"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>outlet.1.desc</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>PowerShare Outlet 1</tt></td>
              <td align="left" colspan="1" rowspan="1">"Outlet description"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>outlet.1.id</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>2</tt></td>
              <td align="left" colspan="1" rowspan="1">"Outlet system identifier"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>outlet.1.status</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>on</tt></td>
              <td align="left" colspan="1" rowspan="1">"Outlet switch status"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>outlet.1.switchable</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>no</tt></td>
              <td align="left" colspan="1" rowspan="1">"Outlet switch ability"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>outlet.2.desc</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>PowerShare Outlet 2</tt></td>
              <td align="left" colspan="1" rowspan="1">"Outlet description"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>outlet.2.id</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>3</tt></td>
              <td align="left" colspan="1" rowspan="1">"Outlet system identifier"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>outlet.2.status</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>on</tt></td>
              <td align="left" colspan="1" rowspan="1">"Outlet switch status"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>outlet.2.switchable</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>no</tt></td>
              <td align="left" colspan="1" rowspan="1">"Outlet switch ability"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>outlet.desc</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>Main Outlet</tt></td>
              <td align="left" colspan="1" rowspan="1">"Outlet description"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>outlet.id</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>1</tt></td>
              <td align="left" colspan="1" rowspan="1">"Outlet system identifier"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>outlet.power</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>25</tt></td>
              <td align="left" colspan="1" rowspan="1">""</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>outlet.switchable</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>no</tt></td>
              <td align="left" colspan="1" rowspan="1">"Outlet switch ability"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>output.frequency.nominal</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>50</tt></td>
              <td align="left" colspan="1" rowspan="1">"Nominal output frequency (Hz)"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>output.voltage</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>230.0</tt></td>
              <td align="left" colspan="1" rowspan="1">"Output voltage (V)"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>output.voltage.nominal</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>230</tt></td>
              <td align="left" colspan="1" rowspan="1">"Nominal output voltage (V)"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>ups.beeper.status</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>enabled</tt></td>
              <td align="left" colspan="1" rowspan="1">"UPS beeper status"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>ups.delay.shutdown</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>20</tt></td>
              <td align="left" colspan="1" rowspan="1">"Interval to wait after shutdown with delay command (seconds)"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>ups.delay.start</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>30</tt></td>
              <td align="left" colspan="1" rowspan="1">"Interval to wait before (re)starting the load (seconds)"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>ups.firmware</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>02</tt></td>
              <td align="left" colspan="1" rowspan="1">"UPS firmware"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>ups.load</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>20</tt></td>
              <td align="left" colspan="1" rowspan="1">"Load on UPS (percent of full)"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>ups.mfr</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>Example Mfg</tt></td>
              <td align="left" colspan="1" rowspan="1">"UPS manufacturer"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>ups.model</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>Economy 1600</tt></td>
              <td align="left" colspan="1" rowspan="1">"UPS model"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>ups.power.nominal</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>1600</tt></td>
              <td align="left" colspan="1" rowspan="1">"UPS power rating (VA)"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>ups.productid</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>ffff</tt></td>
              <td align="left" colspan="1" rowspan="1">"Product ID for USB devices"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>ups.serial</tt> </td>
              <td align="left" colspan="1" rowspan="1">
                <tt>000000000</tt> </td>
              <td align="left" colspan="1" rowspan="1">"UPS serial number"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>ups.status</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>OL</tt></td>
              <td align="left" colspan="1" rowspan="1">"UPS status"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>ups.temperature</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>27</tt></td>
              <td align="left" colspan="1" rowspan="1">"UPS temperature (C)"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>ups.timer.shutdown</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>0</tt></td>
              <td align="left" colspan="1" rowspan="1">"Time before the load will be shutdown (seconds)"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>ups.timer.start</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>0</tt></td>
              <td align="left" colspan="1" rowspan="1">"Time before the load will be started (seconds)"</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>ups.vendorid</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>0999</tt></td>
              <td align="left" colspan="1" rowspan="1">"Vendor ID for USB devices"</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="rw" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.2">
        <name slugifiedName="name-typical-ups-readable-and-wr">Typical UPS Readable and Writable Variables</name>
        <t indent="0" pn="section-appendix.a.2-1">Some of the features of a UPS are represented by variables that
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" format="default" sectionFormat="of" derivedContent="Section 2.6, Paragraph 3"/>.
</t>
        <table align="center" pn="table-7">
          <name slugifiedName="name-typical-readable-and-writab">Typical Readable and Writable UPS Variables</name>
          <thead>
            <tr>
              <th align="center" colspan="1" rowspan="1">Variable</th>
              <th align="center" colspan="1" rowspan="1">Typical Value</th>
              <th align="center" colspan="1" rowspan="1">Default Description Provided as Response to the Command <tt>GET DESC</tt></th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>battery.charge.low</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>20</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>"Remaining battery level when UPS switches to LB (percent)"</tt></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>input.transfer.high</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>264</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>"High voltage transfer point (V)"</tt></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>input.transfer.low</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>184</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>"Low voltage transfer point (V)"</tt></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>outlet.1.desc</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>PowerShare Outlet 1</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>"Outlet description"</tt></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>outlet.2.desc</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>PowerShare Outlet 2</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>"Outlet description"</tt></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>outlet.2.switchable</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>no</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>"Outlet switch ability"</tt></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>outlet.desc</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>Main Outlet</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>"Outlet description"</tt></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>outlet.power</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>25</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>"Description unavailable"</tt></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>output.voltage.nominal</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>230</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>"Nominal output voltage (V)"</tt></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>ups.delay.shutdown</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>20</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>"Interval to wait after shutdown with delay command (seconds)"</tt></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>ups.delay.start</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>30</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <tt>"Interval to wait before (re)starting the load (seconds)"</tt></td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="instcmdexamples" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.3">
        <name slugifiedName="name-typical-ups-instant-command">Typical UPS Instant Commands</name>
        <t indent="0" pn="section-appendix.a.3-1">Some of the features of a UPS are actions known as Instant
Commands (see <xref target="IC" format="default" sectionFormat="of" derivedContent="Section 2.5"/>), 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" format="default" sectionFormat="of" derivedContent="Section 2.6, Paragraph 3"/>.
</t>
        <table align="center" pn="table-8">
          <name slugifiedName="name-typical-instant-commands">Typical Instant Commands</name>
          <thead>
            <tr>
              <th align="center" colspan="1" rowspan="1">Command</th>
              <th align="center" colspan="1" rowspan="1">Meaning</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>beeper.disable</tt></td>
              <td align="left" colspan="1" rowspan="1">Disable the UPS beeper</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>beeper.enable</tt></td>
              <td align="left" colspan="1" rowspan="1">Enable the UPS beeper</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>beeper.mute</tt></td>
              <td align="left" colspan="1" rowspan="1">Temporarily mute the UPS beeper</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>load.off</tt></td>
              <td align="left" colspan="1" rowspan="1">Turn off the load immediately</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>load.off.delay</tt></td>
              <td align="left" colspan="1" rowspan="1">Turn off the load with a delay (seconds)</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>load.on</tt></td>
              <td align="left" colspan="1" rowspan="1">Turn on the load immediately</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>load.on.delay</tt></td>
              <td align="left" colspan="1" rowspan="1">Turn on the load with a delay (seconds)</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>shutdown.return</tt></td>
              <td align="left" colspan="1" rowspan="1">Turn off the load and return when power is back</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>shutdown.stayoff</tt></td>
              <td align="left" colspan="1" rowspan="1">Turn off the load and remain off</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>shutdown.stop</tt></td>
              <td align="left" colspan="1" rowspan="1">Stop a shutdown in progress</td>
            </tr>
          </tbody>
        </table>
      </section>
    </section>
    <section anchor="shutdownstory" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.b">
      <name slugifiedName="name-the-shutdown-story-for-syst">The Shutdown Story for System and UPS</name>
      <t indent="0" pn="section-appendix.b-1">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 indent="0" pn="section-appendix.b-2">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" format="default" sectionFormat="of" derivedContent="Figure 8"/>.
</t>
      <figure anchor="fig.story" align="left" suppress-title="false" pn="figure-8">
        <name slugifiedName="name-long-running-unattended-ser">Long-Running Unattended Server</name>
        <artwork align="center" type="ascii-art" pn="section-appendix.b-3.1">
           ,------------------SERVER------------------,
           |                    |                     |
 ,-----,   |     UPS       &lt;-Commands        UPS      |
 | UPS |---|  Attachment        |         Management  |
 |     |===|    Daemon       Responses-&gt;    Daemon    |
 /-----\   '--------------------'---------------------'
                             Internal
                             loopback
</artwork>
      </figure>
      <ol spacing="normal" indent="adaptive" start="1" type="1" pn="section-appendix.b-4">
<li anchor="start" pn="section-appendix.b-4.1" derivedCounter="1.">
          <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 pn="section-appendix.b-4.2" derivedCounter="2.">
          <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 pn="section-appendix.b-4.3" derivedCounter="3.">The Management Daemon logs warning messages. The server is still operational,
running on the UPS battery. <em>Minutes go by...</em></li>
        <li pn="section-appendix.b-4.4" derivedCounter="4.">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 pn="section-appendix.b-4.5" derivedCounter="5.">The Management Daemon logs the low battery event.</li>
        <li anchor="setFSD" pn="section-appendix.b-4.6" derivedCounter="6.">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" pn="section-appendix.b-4.7" derivedCounter="7.">The operating system's shutdown process takes
over. During the system shutdown, a specific script to the NUT Project or an
equivalent system 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 pn="section-appendix.b-4.8" derivedCounter="8.">The system shuts down and powers down, hopefully before the N=20
seconds have passed.</li>
        <li anchor="UPSshutdown" pn="section-appendix.b-4.9" derivedCounter="9.">
          <t indent="0" pn="section-appendix.b-4.9.1"><em>N seconds after
item <xref target="upsdrvctl" format="counter" sectionFormat="of" derivedContent="7"/></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 indent="0" pn="section-appendix.b-4.9.2">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 pn="section-appendix.b-4.10" derivedCounter="10.">
          <em>Some time later, maybe much later, the public power supply returns.</em>
The UPS reconnects its outlets to send power to the protected system.</li>
        <li anchor="UPSrestart" pn="section-appendix.b-4.11" derivedCounter="11.">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 pn="section-appendix.b-4.12" derivedCounter="12.">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 pn="section-appendix.b-4.13" derivedCounter="13.">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 item <xref target="start" format="counter" sectionFormat="of" derivedContent="1"/> above.</li>
      </ol>
    </section>
    <section anchor="differences" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.c">
      <name slugifiedName="name-technical-terms-historical-">Technical Terms: Historical Differences</name>
      <t indent="0" pn="section-appendix.c-1">This appendix lists the major differences between the technical
terms used in NUT software release 2.8.0 and documented in this text,
as well as those used in previous version 2.7.4 of the NUT Project.
</t>
      <table align="center" pn="table-9">
        <name slugifiedName="name-technical-terms-historical-d">Technical Terms: Historical Differences</name>
        <thead>
          <tr>
            <th align="left" colspan="1" rowspan="1">Term in Previous<br/>Release NUT 2.7.4</th>
            <th align="left" colspan="1" rowspan="1">Term in this Document,<br/>Release NUT 2.8.0</th>
            <th align="left" colspan="1" rowspan="1">Reference
</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left" colspan="1" rowspan="1">ALREADY-LOGGED-IN</td>
            <td align="left" colspan="1" rowspan="1">ALREADY-ATTACHED</td>
            <td align="left" colspan="1" rowspan="1">
              <xref target="errors" format="default" sectionFormat="of" derivedContent="Table 3"/></td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">ALREADY-SSL-MODE</td>
            <td align="left" colspan="1" rowspan="1">TLS-ALREADY-ENABLED</td>
            <td align="left" colspan="1" rowspan="1">
              <xref target="errors" format="default" sectionFormat="of" derivedContent="Table 3"/></td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">
              <tt>LOGIN</tt></td>
            <td align="left" colspan="1" rowspan="1">
              <tt>ATTACH</tt></td>
            <td align="left" colspan="1" rowspan="1">
              <xref target="attach" format="default" sectionFormat="of" derivedContent="Section 4.2.1"/></td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">
              <tt>LOGOUT</tt></td>
            <td align="left" colspan="1" rowspan="1">
              <tt>DETACH</tt></td>
            <td align="left" colspan="1" rowspan="1">
              <xref target="detach" format="default" sectionFormat="of" derivedContent="Section 4.2.2"/></td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">Master</td>
            <td align="left" colspan="1" rowspan="1">Primary</td>
            <td align="left" colspan="1" rowspan="1">
              <xref target="prim" format="default" sectionFormat="of" derivedContent="Section 2.7"/></td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">
              <tt>NETVER</tt></td>
            <td align="left" colspan="1" rowspan="1">
              <tt>PROTVER</tt></td>
            <td align="left" colspan="1" rowspan="1">
              <xref target="protver" format="default" sectionFormat="of" derivedContent="Section 4.2.10"/></td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">
              <tt>NUMLOGINS</tt></td>
            <td align="left" colspan="1" rowspan="1">
              <tt>NUMATTACH</tt></td>
            <td align="left" colspan="1" rowspan="1">
              <xref target="numattach" format="default" sectionFormat="of" derivedContent="Section 4.2.4.3"/></td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">Slave</td>
            <td align="left" colspan="1" rowspan="1">Secondary</td>
            <td align="left" colspan="1" rowspan="1">
              <xref target="sec" format="default" sectionFormat="of" derivedContent="Section 2.8"/></td>
          </tr>
        </tbody>
      </table>
    </section>
    <section anchor="AppendixEavesdropping" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.d">
      <name slugifiedName="name-security-defenses-in-releas">Security Defenses in Release 2.7.4</name>
      <t indent="0" pn="section-appendix.d-1">Previous NUT version 2.7.4 did not provide support for TLS
1.3 <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="RFC8446"/>.  The following subsections
describe mitigating techniques.
</t>
      <section anchor="Shims" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.d.1">
        <name slugifiedName="name-shims">Shims</name>
        <t indent="0" pn="section-appendix.d.1-1">Previous version 2.7.4 of NUT did not support TLS
1.3 <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="RFC8446"/>.  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 <xref target="fig.shim" format="default" sectionFormat="of" derivedContent="Figure 9"/>.  These shims
provide TLS 1.3 support, thus allowing the Attachment Daemon and Management Daemon to continue
temporarily without having TLS implementations themselves.  The technique has been successfully
tested. 
</t>
        <figure anchor="fig.shim" align="left" suppress-title="false" pn="figure-9">
          <name slugifiedName="name-shims-provide-tls-support-d">Shims Provide TLS Support During Migration
</name>
          <artwork align="center" type="ascii-art" pn="section-appendix.d.1-2.1">
                TLS shim listens     TLS shim listens
                on port TBD1/TCP     on port 3493/TCP
 ,-----,------------,----,               ,----,--------------,
 | UPS - Attachment |TLS | &lt;-STARTTLS    | TLS|  Management  |
 |     |   Daemon   |shim|         OK--&gt; |shim|    Daemon    |
 /-----'------------'----\               '----'--------------'
         Listens on
       port 3493/TCP
</artwork>
        </figure>
        <section numbered="true" removeInRFC="false" toc="include" pn="section-appendix.d.1.1">
          <name slugifiedName="name-attachment-daemon-shim">Attachment Daemon Shim</name>
          <t indent="0" pn="section-appendix.d.1.1-1">The shim in front of the Attachment Daemon listens to incoming traffic on port
TBD1/TCP.  When it receives the command <tt>STARTTLS</tt>, it:
</t>
          <ol spacing="compact" indent="adaptive" start="1" type="1" pn="section-appendix.d.1.1-2">
<li pn="section-appendix.d.1.1-2.1" derivedCounter="1.">returns <tt>OK</tt> to the client and sets up TLS encapsulation.</li>
            <li pn="section-appendix.d.1.1-2.2" derivedCounter="2.">does not send <tt>STARTTLS</tt> to the Attachment Daemon port 3493/TCP.</li>
          </ol>
          <t indent="0" pn="section-appendix.d.1.1-3">All other commands and responses are passed through.
</t>
          <t indent="0" pn="section-appendix.d.1.1-4">Note: Port TBD1/TCP is not specified by this text.
</t>
        </section>
        <section numbered="true" removeInRFC="false" toc="include" pn="section-appendix.d.1.2">
          <name slugifiedName="name-management-daemon-shim">Management Daemon Shim</name>
          <t indent="0" pn="section-appendix.d.1.2-1">The shim in front of the Management Daemon listens for incoming traffic on port
3493/TCP.  When it receives the command <tt>STARTTLS</tt>, it:
</t>
          <ol spacing="compact" indent="adaptive" start="1" type="1" pn="section-appendix.d.1.2-2">
<li pn="section-appendix.d.1.2-2.1" derivedCounter="1.">returns <tt>FEATURE-NOT-CONFIGURED</tt> to the client.</li>
            <li pn="section-appendix.d.1.2-2.2" derivedCounter="2.">sends <tt>STARTTLS</tt> to the Attachment Daemon on port TBD1/TCP.</li>
          </ol>
          <t indent="0" pn="section-appendix.d.1.2-3">All other commands and responses are passed through.
</t>
        </section>
      </section>
      <section anchor="TLStunnel" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.d.2">
        <name slugifiedName="name-tls-tunnels">TLS Tunnels</name>
        <t indent="0" pn="section-appendix.d.2-1">Another technique is the use of <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="RFC8446">TLS
tunnels</xref>, using a software, such as
stunnel <xref target="stunnel" format="default" sectionFormat="of" derivedContent="stunnel"/>, 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" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.d.3">
        <name slugifiedName="name-vpn">VPN</name>
        <t indent="0" pn="section-appendix.d.3-1">A further option to secure communications is very similar
to <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="RFC8446">TLS tunneling</xref> and consists of
routing the NUT traffic through a Virtual Private Network (VPN).
</t>
      </section>
      <section anchor="VLAN" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.d.4">
        <name slugifiedName="name-vlan">VLAN</name>
        <t indent="0" pn="section-appendix.d.4-1">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" align="left" suppress-title="false" pn="figure-10">
          <name slugifiedName="name-ups-management-protocol-run">UPS Management Protocol Runs over Its Own VLAN
</name>
          <artwork align="center" type="ascii-art" pn="section-appendix.d.4-2.1">
          ,-------------,               ,-------------,
,-----,   | Attachment  |               | Management  |
| UPS |---|   Daemon    |               |   Daemon    |
|     |   |-------------|      UPS      |-------------|
|     |===|             |   Management  |    UPS      |
/-----\   | Protected   |~~~~~~~~~~~~~~~| Management  |
          |  Server     |     VLAN      |   Client    |
          |             |               '-------------'
          '-------------'
      Production | VLAN
             ,---|-------,
            ,-----------,|
           ,-----------,|'
           |  Clients  |'
           '-----------'
</artwork>
        </figure>
        <t indent="0" pn="section-appendix.d.4-3">In <xref target="fig.VLAN" format="default" sectionFormat="of" derivedContent="Figure 10"/>, there are two VLANS: the main
traffic between the protected server and its clients using 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" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.e">
      <name slugifiedName="name-administrative-security">Administrative Security</name>
      <t indent="0" pn="section-appendix.e-1">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 section presents the current practice.
</t>
      <section anchor="adminuser" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.e.1">
        <name slugifiedName="name-management-of-administrativ">Management of Administrative Users</name>
        <t indent="0" pn="section-appendix.e.1-1">The Attachment Daemon maintains a file (currently <tt>upsd.users</tt>) that defines
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 that define that user's
privileges. The section begins with the name of the user enclosed in
square brackets,  opening bracket ([)
and  closing bracket (]), and continues until
the next username in brackets or EOF.
</t>
        <t indent="0" pn="section-appendix.e.1-2">For example, the following file declares two administrative users,
<tt>admin</tt> and <tt>pfy</tt>:</t>
        <sourcecode name="" type="shell" markers="false" pn="section-appendix.e.1-3">
   [admin]
       password = sekret
       upsmon master
       actions = SET
       instcmds = ALL
   [pfy]
       password = sekret
       instcmds = test.panel.start
       instcmds = test.panel.stop
</sourcecode>
        <t indent="0" pn="section-appendix.e.1-4">Within each section, the administrative user declarations are:
</t>
        <table align="center" pn="table-10">
          <name slugifiedName="name-administrative-user-declara">Administrative User Declarations</name>
          <thead>
            <tr>
              <th align="center" colspan="1" rowspan="1">Declaration </th>
              <th align="center" colspan="1" rowspan="1">Meaning</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>actions</tt></td>
              <td align="left" colspan="1" rowspan="1">
                <t indent="0" pn="section-appendix.e.1-5.2.1.2.1">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 spacing="normal" bare="false" empty="false" indent="3" pn="section-appendix.e.1-5.2.1.2.2">
                  <li pn="section-appendix.e.1-5.2.1.2.2.1">
                    <tt>FSD</tt> Set the "Forced Shutdown" flag for this UPS.
See <xref target="FSD" format="default" sectionFormat="of" derivedContent="Section 4.2.3"/>.</li>
                  <li pn="section-appendix.e.1-5.2.1.2.2.2">
                    <tt>SET</tt> Change the value of a UPS variable.  See <xref target="set" format="default" sectionFormat="of" derivedContent="Section 4.2.11"/>.</li>
                </ul>
              </td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>instcmds</tt></td>
              <td align="left" colspan="1" rowspan="1">Let a user initiate specific Instant Commands. See
        <xref target="instcmd" format="default" sectionFormat="of" derivedContent="Section 4.2.6"/>.  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 align="left" colspan="1" rowspan="1">
                <tt>password</tt></td>
              <td align="left" colspan="1" rowspan="1">Set the password for this user.  <em>Your password should be
    more secure than the examples shown.</em></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">
                <tt>upsmon</tt></td>
              <td align="left" colspan="1" rowspan="1">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 
    EQUALS  =.</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="adsecclient" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.e.2">
        <name slugifiedName="name-an-administrative-user-of-a">An Administrative User of a Client Management Daemon</name>
        <t indent="0" pn="section-appendix.e.2-1">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 Sections <xref target="username" format="counter" sectionFormat="of" derivedContent="4.2.13"/>
and <xref target="password" format="counter" sectionFormat="of" derivedContent="4.2.8"/>.
</t>
        <section numbered="true" removeInRFC="false" toc="include" pn="section-appendix.e.2.1">
          <name slugifiedName="name-an-administrative-user-logs">An Administrative User Logs into a Short Session</name>
          <t indent="0" pn="section-appendix.e.2.1-1">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 name="" type="shell" markers="false" pn="section-appendix.e.2.1-2">
upsrw -s battery.charge.low=35 -u admin -p sekret UPS-1@example.com
</sourcecode>
          <t indent="0" pn="section-appendix.e.2.1-3">Option <tt>-s</tt> specifies the variable and the value,
option <tt>-u</tt> specifies the <tt>USERNAME</tt>, option <tt>-p</tt>
specifies the <tt>PASSWORD</tt>, and <tt>UPS-1@example.com</tt> is the
UPS.  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>
          <t indent="0" pn="section-appendix.e.2.1-4">Note: Your password should be stronger than the example shown.
</t>
        </section>
        <section anchor="longsess" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.e.2.2">
          <name slugifiedName="name-an-administrative-user-logs-">An Administrative User Logs into a Long Session</name>
          <t indent="0" pn="section-appendix.e.2.2-1">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 name="" type="shell" markers="false" pn="section-appendix.e.2.2-2">
MONITOR UPS-1@example.com 1 admin sekret master
</sourcecode>
          <t indent="0" pn="section-appendix.e.2.2-3"> 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 still uses the former term <tt>master</tt>.
</t>
          <t indent="0" pn="section-appendix.e.2.2-4">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 anchor="Ack" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.f">
      <name slugifiedName="name-acknowledgments">Acknowledgments</name>
      <t indent="0" pn="section-appendix.f-1">This document is based on the
NUT Project <xref target="devguide" format="default" sectionFormat="of" derivedContent="devguide">documentation</xref>. The editor
acknowledges the work of <contact fullname="Charles Lepple"/>, <contact fullname="Arjen de Korte"/>, <contact fullname="Arnaud Quette"/>,
<contact fullname="Jim Klimov"/>, <contact fullname="Russell Kroll"/>,
<contact fullname="Manuel Wolfshant"/>, <contact fullname="Greg Troxel"/>,
<contact fullname="Mark Hansen"/>, and many others who contribute to
the <xref target="nut-upsuser" format="default" sectionFormat="of" derivedContent="nut-upsuser">nut-upsuser</xref>
and <xref target="nut-upsdev" format="default" sectionFormat="of" derivedContent="nut-upsdev">nut-upsdev</xref> mailing lists.
</t>
      <t indent="0" pn="section-appendix.f-2">Earlier draft versions of this document were prepared using an SGML DTD <xref target="SGML" format="default" sectionFormat="of" derivedContent="SGML"/>
and an XML meta-DTD defined by HyTime Annex A <xref target="HyTimeA" format="default" sectionFormat="of" derivedContent="HyTimeA"/>.  Unlike
XML, SGML offers markup minimization, and the earlier drafts took
advantage of this.  The osgmlnorm <xref target="sgmlnorm" format="default" sectionFormat="of" derivedContent="sgmlnorm"/> program generated the
XML that was used as input to xml2rfc <xref target="RFC7991" format="default" sectionFormat="of" derivedContent="RFC7991"/>, which then created
the document's current source. The editor acknowledges the help received 
from <contact fullname="Carsten Bormann"/> and <contact fullname="Julian Reschke"/> in the xml2rfc mailing list.</t>
      <t indent="0" pn="section-appendix.f-3">Many helpful comments were received from <contact fullname="Eliot Lear"/>,
<contact fullname="Bart Smit"/>, <contact fullname="David Zomaya"/>,
<contact fullname="Joyce Norris"/>, and <contact fullname="Ted Mittelstaedt"/>.
</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.g">
      <name slugifiedName="name-authors-address">Author's Address</name>
      <author initials="R." surname="Price" fullname="Roger Price" role="editor">
        <organization showOnFrontPage="true">Network UPS Tools Project</organization>
        <address>
          <postal>
            <country>France</country>
          </postal>
          <email>ietf@rogerprice.org</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
