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> 27 / 84<br />

Checking upsmon<br />

Look for messages in the syslog to indicate success. It should look something like this:<br />

May 29 01:11:27 mybox upsmon[102]: Startup successful<br />

May 29 01:11:28 mybox upsd[100]: Client monuser@192.168.50.1<br />

logged into <strong>UPS</strong> [myupsname]<br />

Any errors seen here are probably due to an error in the config files of either upsmon or upsd. You should fix them before<br />

continuing.<br />

Startup scripts<br />

Note<br />

This step is not need if you installed from packages.<br />

Edit your startup scripts, and add a call to upsmon.<br />

Make sure upsmon starts when your system comes up. Do it after upsdrvctl and upsd, or it will complain about not being<br />

able to contact the server.<br />

You may delete the POWERDOWNFLAG in the startup scripts, but it is not necessary. upsmon will clear that file for you when<br />

it starts.<br />

Note<br />

Init script examples are provide in the scripts directory of the NUT source tree, and in the various packages that exist.<br />

Shutdown scripts<br />

Note<br />

This step is not need if you installed from packages.<br />

Edit your shutdown scripts, and add upsdrvctl shutdown.<br />

You should configure your system to power down the <strong>UPS</strong> after the filesystems are remounted read-only. Have it look for the<br />

presence of the POWERDOWNFLAG (from upsmon.conf(5)), using this as an example:<br />

if (test -f /etc/killpower)<br />

then<br />

echo "Killing the power, bye!"<br />

/usr/local/ups/bin/upsdrvctl shutdown<br />

sleep 120<br />

fi<br />

# uh oh... the <strong>UPS</strong> power-off failed<br />

# you probably want to reboot here so you don’t get stuck!<br />

# *** see also the section on power races in the FAQ! ***<br />

Warning<br />

• Be careful that upsdrvctl command will probably power off your machine. Don’t use it unless your system is ready to<br />

be halted by force. If you run RAID, read the RAID warning below!<br />

• Make sure the filesystem(s) containing upsdrvctl, ups.conf and your <strong>UPS</strong> driver(s) are mounted (possibly in read-only<br />

mode) when the system gets to this point. Otherwise it won’t be able to figure out what to do.

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

Saved successfully!

Ooh no, something went wrong!