02.12.2015 Views

Network UPS Tools User Manual

Network UPS Tools User Manual

Network UPS Tools User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Network</strong> <strong>UPS</strong> <strong>Tools</strong> <strong>User</strong> <strong>Manual</strong> 25 / 84<br />

• generate a NOTIFY_SHUTDOWN event<br />

• wait FINALDELAY seconds - typically 5<br />

• call their SHUTDOWNCMD<br />

• disconnect from upsd<br />

5. The upsmon master system waits up to HOSTSYNC seconds (typically 15) for the slaves to disconnect from upsd. If any<br />

are connected after this time, upsmon stops waiting and proceeds with the shutdown process.<br />

6. The upsmon master:<br />

• generates a NOTIFY_SHUTDOWN event<br />

• waits FINALDELAY seconds - typically 5<br />

• creates the POWERDOWNFLAG file - usually /etc/killpower<br />

• calls the SHUTDOWNCMD<br />

7. On most systems, init takes over, kills your processes, syncs and unmounts some filesystems, and remounts some read-only.<br />

8. init then runs your shutdown script. This checks for the POWERDOWNFLAG, finds it, and tells the <strong>UPS</strong> driver(s) to<br />

power off the load.<br />

9. The system loses power.<br />

10. Time passes. The power returns, and the <strong>UPS</strong> switches back on.<br />

11. All systems reboot and go back to work.<br />

6.3.2 How you set it up<br />

NUT user creation<br />

Create a upsd user for upsmon to use while monitoring this <strong>UPS</strong>.<br />

Edit upsd.users and create a new section. upsmon will connect to upsd and use this user name (in brackets) and password to<br />

authenticate. This example is for a user called "monuser":<br />

[monuser]<br />

password = mypass<br />

upsmon master<br />

# or upsmon slave<br />

References: upsd(8), upsd.users(5)<br />

Reloading the data server<br />

Reload upsd. Depending on your configuration, you may be able to do this without stopping upsd:<br />

/usr/local/ups/sbin/upsd -c reload<br />

If that doesn’t work (check the syslog), just restart it:<br />

/usr/local/ups/sbin/upsd -c stop<br />

/usr/local/ups/sbin/upsd<br />

Note<br />

if you want to make reloading work later, see the entry in the FAQ about starting upsd as a different user.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!