(408) 943-4100               V   Commercial Support Toggle between Light and Dark mode

UPS

  4 minute read.

Last Modified 2021-07-30 09:07 EDT

TrueNAS uses NUT (Network UPS Tools) to provide UPS support. When the TrueNAS system is connected to a UPS device, configure the UPS service by going to Services, finding the UPS entry, and clicking .

ServicesUPSOptions

General Options

NameDescription
IdentifierDescribe the UPS device. It can contain alphanumeric, period, comma, hyphen, and underscore characters.
UPS ModeChoose Master if the UPS is plugged directly into the system serial port. The UPS will remain the last item to shut down. Choose Slave to have this system shut down before Master. See the Network UPS Tools Overview.
DriverSee the Network UPS Tools compatibility listfor a list of supported UPS devices.
Port or HostnameSerial or USB port connected to the UPS. To automatically detect and manage the USB port settings, select auto.

When an SNMP driver is selected, enter the IP address or hostname of the SNMP UPS device.

Monitor

NameDescription
Monitor UserEnter a user to associate with this service. Keeping the default is recommended.
Monitor PasswordChange the default password to improve system security. The new password cannot contain a space or #.Enter accounts that have administrative access. See upsd.users(5) for examples.
Extra UsersEnter accounts that have administrative access. See upsd.users(5) for examples.
Remote MonitorSet for the default configuration to listen on all interfaces using the known values of user: upsmon and password: fixmepass.

Shutdown

NameDescription
Shutdown ModeChoose when the UPS initiates shutdown.
Shutdown TimerEnter a value in seconds for the the UPS to wait before initiating shutdown. Shutdown will not occur if power is restored while the timer is counting down. This value only applies when Shutdown mode is set to UPS goes on battery.
Shutdown CommandEnter a command to shut down the system when either battery power is low or the shutdown timer ends.
Power off UPSSet for the UPS to power off after shutting down the system.

Email

NameDescription
Send Email Status UpdatesSet enable sending messages to the address defined in the Email field.
EmailEnter any email addresses to receive status updates. Separate entries by pressing Enter.
Email SubjectEnter the subject for status emails.

Other Options

NameDescription
No Communication Warning TimeEnter a number of seconds to wait before alerting that the service cannot reach any UPS. Warnings continue until the situation is fixed.
Host SyncUpsmon will wait up to this many seconds in master mode for the slaves to disconnect during a shutdown situation.
DescriptionDescribe this service.
Auxiliary Parameters (ups.conf)Enter any extra options from ups.conf.
Auxiliary Parameters (upsd.conf)Enter any extra options from upsd.conf.

Some UPS models can be unresponsive with the default polling frequency. This shows in TrueNAS logs as a recurring error like libusb_get_interrupt: Unknown error. If this error occurs, decrease the polling frequency by adding an entry to Auxiliary Parameters (ups.conf): pollinterval = 10. The default polling frequency is two seconds.

upsc(8) can get status variables like the current charge and input voltage from the UPS daemon. Run this from the Shell using the syntax upsc ups@localhost. The upsc(8) manual page has other usage examples.

upscmd(8) can send commands directly to the UPS, assuming the hardware supports the command being sent. Only users with administrative rights can use this command. These users are created in the Extra Users field.

For USB devices, the easiest way to determine the correct device name is to set Show console messages in System > Advanced. Plug in the USB device and look for a /dev/ugen or /dev/uhid device name in the console messages.
A UPS with adequate capacity can power multiple computers. One computer is connected to the UPS data port with a serial or USB cable. This primary system makes UPS status available on the network for other computers. The secondary computers are powered by the UPS, but receive UPS status data from the primary computer. See the NUT User Manual and NUT User Manual Pages.