1 '\" -*- coding: UTF-8 -*-
2 .\" Copyright (C) 1994 Miquel van Smoorenburg.
4 .\" This program is free software; you can redistribute it and/or modify
5 .\" it under the terms of the GNU General Public License as published by
6 .\" the Free Software Foundation; either version 2 of the License, or
7 .\" (at your option) any later version.
9 .\" This program is distributed in the hope that it will be useful,
10 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
11 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 .\" GNU General Public License for more details.
14 .\" You should have received a copy of the GNU General Public License
15 .\" along with this program; if not, write to the Free Software
16 .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 .TH POWERD 8 "Feb 14, 1994" "" "Linux System Administrator's Manual"
20 .\" powerd \(em monitor a serial line connected to an UPS.
21 powerd -- monitor a serial line connected to an UPS.
27 is a daemon process that sits in the background and monitors the state
28 of the DCD line of the serial device. This line is meant to be
29 connected to a UPS (Uninterruptible Power Supply) so that \fBpowerd\fP knows
30 about the state of the UPS. As soon as \fBpowerd\fP senses that the
31 power is failing (it sees that DCD goes low) it notifies \fBinit\fP(8),
32 and \fBinit\fP then executes the \fBpowerwait\fP and \fBpowerfail\fP entries.
33 If \fBpowerd\fP senses that the power has been restored, it notifies \fBinit\fP
34 again and \fBinit\fP will execute the \fBpowerokwait\fP entries.
37 Some serial port that is not being used by some other device, and does not
38 share an interrupt with any other serial port.
40 \fBPowerd\fP regularly checks the \fBDSR\fP line to see if it's high.
41 \fBDSR\fP should be directly connected to \fBDTR\fP and \fBpowerd\fP
42 keeps that line high, so if \fBDSR\fP is low then something is wrong
43 with the connection. \fBPowerd\fP will notify you about this fact every
44 two minutes. When it sees that the connection has been restored it
47 It's pretty simple to connect your UPS to the Linux machine. The steps
51 Make sure you have an UPS with a simple relay output: it should
52 close its connections (make) if the power is gone, and it should
53 open its connections (break) if the power is good.
56 Buy a serial plug. Connect the DTR line to the DSR line directly.
57 Connect the DTR line and the DCD line with a \fB10 kilo ohm\fP
58 resistor. Now connect the relay output of the UPS to GROUND
59 and the DCD line. If you don't know what pins DSR, DTR, DCD and
60 GROUND are you can always ask at the store where you bought the plug.
65 Well, not a real bug but \fBpowerd\fP should be able to do a broadcast or
66 something on the ethernet in case more Linux-boxes are connected to
67 the same UPS and only one of them is connected to the UPS status line.
73 Miquel van Smoorenburg, miquels@cistron.nl