Add 'make dist' target to get a tarball to test in addition to the upload target.
[sysvinit.git] / obsolete / powerd.8
CommitLineData
a74aeac6
PR
1'\" -*- coding: UTF-8 -*-
2.\" Copyright (C) 1994 Miquel van Smoorenburg.
3.\"
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.
8.\"
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.
13.\"
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
17.\"
18.TH POWERD 8 "Feb 14, 1994" "" "Linux System Administrator's Manual"
19.SH NAME
20.\" powerd \(em monitor a serial line connected to an UPS.
21powerd -- monitor a serial line connected to an UPS.
22.SH SYNOPSIS
23.B /sbin/powerd
24.RB " serial-device "
25.SH DESCRIPTION
26.B Powerd
27is a daemon process that sits in the background and monitors the state
28of the DCD line of the serial device. This line is meant to be
29connected to a UPS (Uninterruptible Power Supply) so that \fBpowerd\fP knows
30about the state of the UPS. As soon as \fBpowerd\fP senses that the
31power is failing (it sees that DCD goes low) it notifies \fBinit\fP(8),
32and \fBinit\fP then executes the \fBpowerwait\fP and \fBpowerfail\fP entries.
33If \fBpowerd\fP senses that the power has been restored, it notifies \fBinit\fP
34again and \fBinit\fP will execute the \fBpowerokwait\fP entries.
35.SH ARGUMENTS
36.IP serial-device
37Some serial port that is not being used by some other device, and does not
38share an interrupt with any other serial port.
39.SH DIAGNOSTICS
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
42keeps that line high, so if \fBDSR\fP is low then something is wrong
43with the connection. \fBPowerd\fP will notify you about this fact every
44two minutes. When it sees that the connection has been restored it
45will say so.
46.SH HOWTO
47It's pretty simple to connect your UPS to the Linux machine. The steps
48are easy:
49.TP 0.5i
50.B 1.
51Make sure you have an UPS with a simple relay output: it should
52close its connections (make) if the power is gone, and it should
53open its connections (break) if the power is good.
54.TP 0.5i
55.B 2.
56Buy a serial plug. Connect the DTR line to the DSR line directly.
57Connect the DTR line and the DCD line with a \fB10 kilo ohm\fP
58resistor. Now connect the relay output of the UPS to GROUND
59and the DCD line. If you don't know what pins DSR, DTR, DCD and
60GROUND are you can always ask at the store where you bought the plug.
61.TP 0.5i
62.B 3.
63You're all set.
64.SH BUGS
65Well, not a real bug but \fBpowerd\fP should be able to do a broadcast or
66something on the ethernet in case more Linux-boxes are connected to
67the same UPS and only one of them is connected to the UPS status line.
68.SH SEE ALSO
69.BR shutdown (8),
70.BR init (8),
71.BR inittab (5)
72.SH AUTHOR
73Miquel van Smoorenburg, miquels@cistron.nl