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

7.2.4 Early Shutdowns<br />

One thing that gets requested a lot is early shutdowns in upsmon. With upssched, you can now have this functionality. Just set a<br />

timer for some length of time at ONBATT which will invoke a shutdown command if it elapses. Just be sure to cancel this timer<br />

if you go back ONLINE before then.<br />

The best way to do this is to use the upsmon callback feature. You can make upsmon set the "forced shutdown" (FSD) flag on<br />

the upsd so your slave systems shut down early too. Just do something like this in your CMDSCRIPT:<br />

/usr/local/ups/sbin/upsmon -c fsd<br />

It’s not a good idea to call your system’s shutdown routine directly from the CMDSCRIPT, since there’s no synchronization with<br />

the slave systems hooked to the same <strong>UPS</strong>. FSD is the master’s way of saying "we’re shutting down now like it or not, so you’d<br />

better get ready".<br />

7.2.5 Background<br />

This program was written primarily to fulfill the requests of users for the early shutdown scenario. The "outboard" design of the<br />

program (relative to upsmon) was intended to reduce the load on the average system. Most people don’t have the requirement of<br />

shutting down after n seconds on battery, since the usual OB+LB testing is sufficient.<br />

This program was created separately so those people don’t have to spend CPU time and RAM on something that will never be<br />

used in their environments.<br />

The design of the timer handler is also geared towards minimizing impact. It will come and go from the process list as necessary.<br />

When a new timer is started, a process will be forked to actually watch the clock and eventually start the CMDSCRIPT. When a<br />

timer triggers, it is removed from the queue. Canceling a timer will also remove it from the queue. When no timers are present<br />

in the queue, the background process exits.<br />

This means that you will only see upssched running when one of two things is happening:<br />

1. There’s a timer of some sort currently running<br />

2. upsmon just called it, and you managed to catch the brief instance<br />

The final optimization handles the possibility of trying to cancel a timer when there’s none running. If there’s no process already<br />

running, there are no timers to cancel, and furthermore there is no need to start a clock-watcher. As a result, it skips that step and<br />

exits sooner.<br />

8 NUT outlets management and PDU notes<br />

NUT supports advanced outlets management for any kind of device that proposes it. This chapter introduces how to manage<br />

outlets in general, and how to take advantage of the provided features.<br />

8.1 Introduction<br />

Outlets are the core of Power Distribution Units. They allow you to turn on, turn off or cycle the load on each outlet.<br />

Some <strong>UPS</strong> models also provide manageable outlets (Eaton, MGE, Powerware, Tripplite, . . . ) that help save power in various<br />

ways, and manage loads more intelligently.<br />

Finally, some devices can be managed in a PDU-like way. Consider blade systems: the blade chassis can be controlled remotely<br />

to turn on, turn off or cycle the power on individual blade servers.<br />

NUT allows you to control all these devices!

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

Saved successfully!

Ooh no, something went wrong!