~ubuntu-branches/ubuntu/saucy/nut/saucy

« back to all changes in this revision

Viewing changes to docs/dummyups.txt

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Quette
  • Date: 2004-05-28 13:10:01 UTC
  • mto: (16.1.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20040528131001-yj2m9qcez4ya2w14
Tags: upstream-1.4.2
ImportĀ upstreamĀ versionĀ 1.4.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Desc: How to use the dummyups driver
2
 
File: dummyups.txt
3
 
Date: 16 December 2001
4
 
Auth: Bill Carlson <wcarlson@wkks.org>
5
 
 
6
 
The dummyups driver is mainly for testing purposes only. It can be used to 
7
 
appear as a UPS in the following states: On Line (OL), On Battery (OB) and Low
8
 
Battery (LB).
9
 
 
10
 
The driver is interactive, at startup you will be presented with a panel for
11
 
setting the current status of the driver. If you do not see this panel on
12
 
startup, this is a good indication you are missing Xdialog. :)
13
 
 
14
 
Requirements:
15
 
 
16
 
dummyups requires Xdialog (http://xdialog.free.fr/) for drawing the panel.
17
 
 
18
 
 
19
 
Installation:
20
 
 
21
 
dummyups is not built by default. Change to models/ in the source after you
22
 
have run ./configure and run "make dummyups". Move the resulting dummyups
23
 
where you wish.
24
 
 
25
 
 
26
 
Usage: dummyups [portname]
27
 
 
28
 
dummyups must run as root under X. It is NOT recommended to make dummyups
29
 
setuid root, doing so is at your own risk. See man xhost and man su for ways
30
 
to run something as root under X. Something like the following would probably
31
 
work:
32
 
 
33
 
xhost +myhost.name
34
 
su -c dummyups
35
 
 
36
 
 
37
 
The portname argument is tagged onto the end of the state filename, it
38
 
defaults to "null". Which means the state file would be called dummyups-null.
39
 
 
40
 
One could run several different dummyups drivers, to perhaps simulation
41
 
multiple power supplies on different UPSes, just give a different portname to
42
 
each one.
43
 
 
44
 
 
45
 
Sample UPS entry from ups.conf with dummyups on portname "biggy":
46
 
 
47
 
[bigdummy]
48
 
        driver = dummyups
49
 
        port = /dev/biggy
50
 
 
51
 
Note that only the last word after the / matters for "port" settings, so
52
 
this could be "/tmp/biggy", "/etc/biggy", or "/xyzzy/biggy".
53
 
 
54
 
 
55
 
Sample upsmon MONITOR line:
56
 
 
57
 
MONITOR bigdummy@localhost 2 duh master
58
 
 
59
 
Meaning monitor bigdummy at the localhost, bigdummy is keeping 2 power
60
 
supplies up, login in with the password "duh" and be master on the UPS.
61
 
 
62
 
Make sure you reload upsd and upsmon ('<prog> -c reload' or 'kill -HUP' <pid>)
63
 
when making changes to their configuration files!