• Edit
  • Delete

Ubuntu Nut UPS (with Eaton 3s)

Nut / UPS




Status Values


  • OL - On line (no power failure) (opposite of OB - on battery)
  • LB - Low battery
  • SD - Shutdown load
  • CP - Cable power (must be present for cable to have valid reading)
  • CTS - Clear to Send. Received from the UPS.
  • RTS - Ready to Send. Sent by the PC.
  • DCD - Data Carrier Detect. Received from the UPS.
  • RNG - Ring indicate. Received from the UPS.
  • DTR - Data Terminal Ready. Sent by the PC.
  • ST - Send a BREAK on the transmit data line

A "-" in front of a signal name (like -RNG) means that the indicated condition is signaled with an active low signal. For example, [LB=-RNG] means the battery is low when the ring indicate line goes low, and that the battery is OK when that line is held high.



  • apt-get install nut

  • lsusb

    • 0463:ffff MGE UPS Systems UPS

  • vi /etc/default/nut

    • START_UPSD=yes
  • vi /etc/nut/ups.conf
    • [eaton3s]
              desc="EATON UPS"
      # !!! Comment out, invalid for Ubuntu 18.04:
      #maxretry = 3
  • vi /etc/nut/upsmon.conf
    • MONITOR eaton3s@localhost 1 monuser pass master
      SHUTDOWNCMD "/etc/nut/shutdown"
  • vi /etc/nut/nut.conf
    • MODE=standalone
  • vi /etc/nut/upsd.users
    • [monuser]
      upsmon master
  • vi /etc/nut/shutdown
    • #!/bin/bash
      # UPS didn't shutdown, so we wrote this script
      upsdrvctl stop
      upsdrvctl shutdown
  • chmod 750 /etc/nut/shutdown
  • chown root:nut /etc/nut/shutdown

Reboot and test

  • Ubuntu 16.04 and older
    • service upsd status
    • service upsmon status
  • The commands above do not exist in Ubuntu 18.04. Instead?
    • service nut-driver status
    • service nut-server status
    • service nut-monitor status
  • upsc eaton3s
  • upsmon -c fsd
    • upsmon shuts down computer, simulates power loss

Problem: Nut Driver does not start


  • upsc eaton3s
  • service nut-server status
  • service nut-server restart

Try manual start and look for errors

  • /sbin/upsdrvctl start

This in turn executes

  • /lib/nut/usbhid-ups -a eaton3s


Problem: Nut Driver does not start up correctly on reboot

  • vi /etc/rc.local
    • #!/bin/sh -e
      # rc.local
      # This script is executed at the end of each multiuser runlevel.
      # Make sure that the script will "exit 0" on success or any other
      # value on error.
      # Sometime UPS driver does not start up correctly
      sleep 300
      service nut-driver restart
      exit 0