Network UPS Tools User Manual
Network UPS Tools User Manual
Network UPS Tools User Manual
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Network</strong> <strong>UPS</strong> <strong>Tools</strong> <strong>User</strong> <strong>Manual</strong> 22 / 84<br />
If the driver doesn’t start cleanly, make sure you have picked the right one for your hardware. You might need to try other drivers<br />
by changing the "driver=" value in ups.conf.<br />
Be sure to check the driver’s man page to see if it needs any extra settings in ups.conf to detect your hardware.<br />
If it says "can’t bind /var/state/ups/. . . " or similar, then your state path probably isn’t writable by the driver. Check the permissions<br />
and mode on that directory.<br />
After making changes, try the Ownership and permissions step again.<br />
References: man pages: nutupsdrv(8), upsdrvctl(8)<br />
6.2.3 Data server configuration (upsd)<br />
Configure upsd, which serves data from the drivers to the clients.<br />
First, edit upsd.conf to allow access to your client systems. By default, upsd will only listen to localhost port 3493/tcp. If you<br />
want to connect to it from other machines, you must specify each interface you want upsd to listen on for connections, optionally<br />
with a port number.<br />
LISTEN 127.0.0.1 3493<br />
LISTEN ::1 3493<br />
Note<br />
Refer to the NUT user manual security chapter for information on how to access and secure upsd clients connections.<br />
Next, create upsd.users. For now, this can be an empty file. You can come back and add more to it later when it’s time to<br />
configure upsmon or run one of the management tools.<br />
Do not make either file world-readable, since they both hold access control data and passwords. They just need to be readable by<br />
the user you created in the preparation process.<br />
The suggested configuration is to chown it to root, chgrp it to the group you created, then make it readable by the group.<br />
chown root:nut upsd.conf upsd.users<br />
chmod 0640 upsd.conf upsd.users<br />
References: man pages: upsd.conf(5), upsd.users(5), upsd(8)<br />
6.2.4 Starting the data server<br />
Start the network data server:<br />
/usr/local/ups/sbin/upsd<br />
Make sure it is able to connect to the driver(s) on your system. A successful run looks like this:<br />
# /usr/local/ups/sbin/upsd<br />
<strong>Network</strong> <strong>UPS</strong> <strong>Tools</strong> upsd 2.4.1<br />
listening on 127.0.0.1 port 3493<br />
listening on ::1 port 3493<br />
Connected to <strong>UPS</strong> [eaton]: usbhid-ups-eaton<br />
upsd prints dots while it waits for the driver to respond. Your system may print more or less depending on how many drivers you<br />
have and how fast they are.<br />
Note<br />
if upsd says that it can’t connect to a <strong>UPS</strong> or that the data is stale, then your ups.conf is not configured correctly, or you have a<br />
driver that isn’t working properly. You must fix this before going on to the next step.<br />
Reference: man page: upsd(8)