Did you know  45Drives offers free  public and private  webinars ? Click here to learn more  & register! Build & Price

KB450213 – Configuring UPS support for FreeNAS

You are here:

Configuring a standalone FreeNAS server is fairly simple, provided your UPS is supported by the Network UPS Tools driver used by FreeNAS. You may consult networkupstools.org’s hardware compatibility list to see if you find your UPS there. Bear in mind that, even if it isn’t listed, your particular model may work fine with one of the generic drivers.

In most cases, your UPS will connect to your FreeNAS server with a USB cable. After connecting your UPS, you can determine the USB port it’s using by running dmesg | grep ugen at a shell prompt.

[root@45drives] ~# dmesg | grep ugen
ugen0.1: <0x15ad> at usbus0
ugen1.1: <0x15ad> at usbus1
ugen0.2: <VMware> at usbus0
ugen0.3: <American Power Conversion> at usbus0
ugen0.4: <vendor 0x0e0f> at usbus0
[root@45drives] ~#

The output shows that my American Power Conversion (APC) UPS is plugged into /dev/ugen0.3, which is the device I specify as the Port on the UPS Settings form shown below.

Now that we have that information we can configure the UPS Service. Click on Services and scroll to the bottom to find the UPS Service. Click on the white circle to start the service and then check the box to start automatically with FreeNAS.

After that click on the pencil icon to edit the service.The things you will need to change are as follows:

  • Driver: You will need to select the correct driver based on your UPS. You can find out which one from this hardware compatibility list
  • Port: You will need to select from the dropdown which USB port you plugged the UPS into
  • Shutdown Mode: Your preference. (UPS goes on battery or UPS reaches low battery)
  • Monitor User & Password: Default user is upsmon and default password is fixmepass
  • There are other options you can change as well but these are the minimal settings for the service to work
  • Click Save to complete the configuration

Once you’ve configured the UPS service, you should check it to confirm everything is working properly. The NUT tools include the upsc command, which you can run in a shell session to check your configuration, passing it the Identifier you assigned in the UPS Settings:

[root@45drives] ~# upsc ups
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.date: 2001/09/25
battery.mfr.date: 2014/05/22
battery.runtime: 555
battery.runtime.low: 120
battery.type: PbAc
battery.voltage: 26.9
battery.voltage.nominal: 24.0
device.mfr: American Power Conversion
device.model: Back-UPS RS 1500
device.serial: BB0743004482
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ugen0.3
driver.parameter.synchronous: no
driver.version: 2.7.3
driver.version.data: APC HID 0.95
driver.version.internal: 0.39
input.sensitivity: high
input.transfer.high: 132
input.transfer.low: 97
input.transfer.reason: input voltage out of range
input.voltage: 123.0
input.voltage.nominal: 120
ups.beeper.status: disabled
ups.delay.shutdown: 20
ups.firmware: 8.g9a.D
ups.firmware.aux: g9a
ups.load: 36
ups.mfr: American Power Conversion
ups.mfr.date: 2007/10/23
ups.model: Back-UPS RS 1500
ups.productid: 0002
ups.realpower.nominal: 865
ups.serial: BB0743004482
ups.status: OL
ups.test.result: No test initiated
ups.timer.reboot: 0
ups.timer.shutdown: -1
ups.vendorid: 051d
Was this article helpful?
Dislike 1
Views: 3207
Unboxing Racking Storage Drives Cable Setup Power UPS Sizing Remote Access