CLONE-OUTLET(8)

πŸŽ€ CLONE-OUTLET(8) πŸŽ€ bestie, let me put you on

okay so this is the clone-outlet page from the NUT Manual β€” and no, it's not about a shopping outlet πŸ’€ it's about pretending one little outlet on your UPS is a whole entire UPS. sit down, hydrate, we're doing this πŸ“


🏷️ NAME

clone-outlet β€” clone an UPS, treating its outlet as if it were an UPS (monitoring only) πŸ’…


πŸ“œ SYNOPSIS

clone-outlet -h

clone-outlet -a UPS_NAME [OPTIONS]
πŸ“Œ note, bestie: this page only spills the tea on the stuff that's specific to the clone-outlet driver. For all the core-driver lore, go read nutupsdrv(8). 🫢

πŸ’– DESCRIPTION

So this driver sits on top of another driver's local UNIX socket file (or a Windows named pipe, slay for cross-platform) and it lets users group clients onto one particular outlet of a device β€” and then treat that outlet's output as if it were a normal, whole UPS. iconic behaviour honestly ✨

Unlike the clone(8) driver, or dummy-ups(8) running in repeater mode, this one represents a read-only device for monitoring and shutdowns. It does not accept setting any values, and it does not accept sending instant commands during run time. It's giving observer, not meddler πŸ‘€

Unlike dummy-ups(8) in general, this driver does not need a running upsd data server, and it does not use the networked NUT protocol to talk to the "real" driver (which, btw, may be remote if you're in dummy-ups repeater mode). no network drama here, we're local πŸ’…

This driver doesn't create a whole brand-new virtual device from scratch. Instead it replaces or extends some of the original readings reported by the "real" driver using info from the specified outlet, and relays all the other readings exactly as they were. lowkey a glow-up, not a rebirth πŸ¦‹

Remote clients like upsmon can MONITOR the device entry that the data server presents, with this driver (and the "real" driver) running and published. periodt.

In a bigger deployment β€” one or more lower-priority devices collected on a manageable outlet of an UPS or ePDU β€” you'd likely see several drivers set up on the system that are actually capable of interacting with the UPS, and running the NUT data server upsd(8) (which is, lol, likely powered by another outlet). the lineup:

  • a "real" driver talking to the UPS 🌸
  • a clone driver talking to the "real" driver and issuing outlet power-off (or power-cycle) based on relatively high thresholds for remaining battery charge and/or runtime of the actual UPS (or explicit instant commands). such operations first set the respective timers for the outlet on the "real" driver, and the "FSD" flag among the states of the virtual UPS status πŸ”₯
  • possibly a clone-outlet driver, which is read-only and interprets the outlet timer values as triggers for the "FSD" or "OFF" flags reported among the states of the virtual UPS status πŸ‘‘

With this approach, the lower-priority systems collected on such an outlet would run the NUT upsmon(8) client to MONITOR the virtual UPS presented by the read-only clone-outlet driver, and shut down as soon as the "FSD" flag is raised (fairly early, based on charge and/or runtime thresholds configured for that driver). That lets the higher-priority devices β€” likely including the NUT server β€” enjoy a longer on-battery life. not me giving the VIPs the aux cord πŸ”‹

The clone driver responsible for outlet power state changes would not normally be monitored directly (e.g. to avoid unfortunate direct shutdown requests from those clients), although it can be β€” instead of clone-outlet β€” in sufficiently trusted networks. iykyk 🀫


πŸŽ›οΈ EXTRA ARGUMENTS

This driver supports the following settings, bestie:

  • port=drivername-devicename β€” Required. This is the standard NUT driver port setting, but here it provides the name of the local Unix socket (or named Windows pipe) used to connect to the "real" driver. πŸ”Œ
  • prefix=outlet.N β€” Required. Specify the outlet prefix as known on the original driver. The subset of data points that the "real" UPS driver reports for the actual device on this prefix will be reported as data points of the virtual UPS maintained by this driver. πŸŽ€

πŸ› οΈ IMPLEMENTATION

The port specification in ups.conf(5) should reference the local driver socket (or Windows named pipe) that the "real" UPS driver is using. For example:

[realups]
   driver = usbhid-ups
   port = auto

[clone-outlet-1]
   driver = clone-outlet
   port = usbhid-ups-realups
   prefix = outlet.1
   desc = "Outlet 1 of the Real UPS"
   [...]

The driver internally interprets the "real" driver's information about shutdown delay and shutdown timer, the whole UPS status, and this outlet's status β€” and relays all the other data points exactly as they were. no notes ✨

If the outlet supports and reports a delayed power-off, the virtual UPS would issue an FSD via ups.status so its clients can shut down safely. safety first, always 🫢

In more detail (okay, this is the part where I lean in):

Given the (required) prefix value such as outlet.1, the driver specifically keeps track of <prefix>.status, <prefix>.delay.shutdown, and <prefix>.timer.shutdown data points reported by the "real" driver. Numeric values of the *.shutdown readings get noted by this driver, and the boolean outlet status ("off" or otherwise) will be remembered. These values will also be re-published by this driver "as is". πŸ’…

The ups.status from the "real" driver would be remembered, but not re-published by this driver immediately. Instead, it gets published during regular "update info" loop cycles, either:

  • with the "OFF" state added (if <prefix>.status indicates the outlet is "off"), πŸ”΄
  • or with the "FSD" state prepended (if <prefix>.timer.shutdown is non-negative and does not exceed the <prefix>.delay.shutdown value), 🚨
  • or "as is" if the outlet power state is "not critical". πŸƒ

🚨 IMPORTANT

Unlike a real UPS, you should not configure a upsmon primary mode for this driver. Here's why, and it's kind of a big deal: when a upsmon(8) primary sees the OB LB flags and tells the upsd(8) server it's OK to initiate the shutdown sequence, the server will latch the FSD status β€” and then it will not be possible to restart the systems connected without restarting the upsd server. πŸ’€

This will be a problem if the power returns after the clone UPS initiated the shutdown sequence on its outlet, but returns before the real UPS begins shutting down. The solution is in the clone driver, which will insert the FSD flag if needed, without the help of a upsmon primary. thank u, next πŸ™


⚠️ CAVEATS

The clone UPS will follow the status on the real UPS driver. You can only make the clone UPS shut down earlier than the real UPS driver β€” never later. If the real UPS driver initiates a shutdown, the clone-outlet UPS driver will immediately follow. no cap, it's a follower not a leader πŸ‘

Be aware that the commands to shutdown/restart an outlet on the real UPS drivers are not affected, so if you tell the real UPS driver to shut down the outlet of the clone-outlet UPS driver immediately, your clients will lose power without warning. A delayed outlet power-off should propagate as FSD, and the delay should be sufficiently long to allow for client shutdowns. give them time to say goodbye 😭

If you use service management frameworks like systemd or SMF to manage the dependencies between driver instances and other units, then you may have to set up special dependencies (e.g. with systemd "drop-in" snippet files) to queue your clone drivers to start after the "real" device drivers. queue like it's a concert lineup 🎟️


πŸ‘‘ AUTHOR

Arjen de Korte <adkorte-guest@alioth.debian.org> β€” thank you for your service, king 🫑


πŸ‘€ SEE ALSO

upscmd(8), upsrw(8), ups.conf(5), clone(8), nutupsdrv(8)

🧸 Dummy driver:

The "repeater" mode of the dummy-ups driver is in some ways similar to the clone and clone-outlet drivers, by relaying information from a locally or remotely running "real" device driver (and NUT data server). cousins, basically πŸ’ž

dummy-ups(8)

🌈 Internet Resources:

The NUT (Network UPS Tools) home page: https://www.networkupstools.org/historic/v2.8.5/


and that's the whole page, bestie 🫢 this was Network UPS Tools 2.8.5, dated 10/07/2026 β€” mwah, go forth and monitor responsibly πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from