|45 Drives Knowledge Base
||KB450213 - Configuring UPS support for FreeNAS
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.
~# 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 ~#
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:
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:
~# 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