FreeNAS® uses NUT (Network UPS Tools) to provide UPS support. If the FreeNAS® system is connected to a UPS device, configure the UPS service then start it in Services → Control Services.
Figure 8.14a shows the UPS configuration screen:
Figure 8.14a: UPS Configuration Screen
Table 8.14a summarizes the options in the UPS Configuration screen:
Table 8.14a: UPS Configuration Options
|UPS Mode||drop-down menu||select from Master or Slave|
|Identifier||string||can contain alphanumeric, period, comma, hyphen, and underscore characters|
|Driver||drop-down menu||supported UPS devices are listed at http://www.networkupstools.org/stable-hcl.html|
|Port||drop-down menu||select the serial or USB port the UPS is plugged into (see NOTE below)|
|Auxiliary Parameters||string||additional options from ups.conf(5)|
|Shutdown mode||drop-down menu||choices are UPS goes on battery and UPS reaches low battery|
|Shutdown timer||integer||in seconds; will initiate shutdown after this many seconds after UPS enters UPS goes on battery, unless power is restored|
|Monitor User||string||default is upsmon|
|Monitor Password||string||default is known value fixmepass and should be changed; can not contain a space or #|
|Extra users||string||defines the accounts that have administrative access; see upsd.users(5) for examples|
|Remote monitor||checkbox||if enabled, be aware that the default is to listen on all interfaces and to use the known values user upsmon and password fixmepass|
|Send Email Status Updates||checkbox||if checked, activates the To email field|
|To email||email address||if Send Email box checked, email address of person to receive status updates|
|Email subject||string||if Send Email box checked, subject of email updates|
NOTE: for USB devices, the easiest way to determine the correct device name is to check the box "Show console messages" in System → Settings → Advanced. Plug in the USB device and the console messages will give the name of the /dev/ugenX.X device; where the X's are the numbers that show on the console.
upsc(8) can be used to get status variables from the UPS daemon such as the current charge and input voltage. It can be run from Shell using the following syntax. The man page gives some other usage examples.
upscmd(8) can be used to send commands directly to the UPS, assuming that 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.