1DUMMY-UPS(8) NUT Manual DUMMY-UPS(8)
2
3
4
6 dummy-ups - Driver for multi-purpose UPS emulation
7
9 This man page only documents the specific features of the dummy-ups
10 driver. For information about the core driver, see nutupsdrv(8).
11
13 This program is a multi-purpose UPS emulation tool. Its behavior
14 depends on the running mode:
15
16 Dummy Mode
17 dummy-ups looks like a standard device driver to upsd(8) and allows one
18 to change any value for testing purposes. It is both interactive,
19 controllable through the upsrw(1) and upscmd(1) commands (or equivalent
20 graphical tool), and batchable through script files. It can be
21 configured, launched and used as any other real driver. This mode is
22 mostly useful for development and testing purposes.
23
24 Repeater Mode
25 dummy-ups acts as a NUT client, simply forwarding data. This can be
26 useful for supervision purposes. This can also allow some load sharing
27 between several UPS instances, using a point-to-point communication
28 with the UPS.
29
31 The port specification depends on the running mode, and allows the
32 driver to select the right mode.
33
34 Dummy Mode
35 Port is a definition file name for dummy-ups. This can either be an
36 absolute or a relative path name. In the latter case the NUT sysconfig
37 directory (ie /etc/nut, /usr/local/ups/etc, ...) is prepended.
38
39 For instance:
40
41 [dummy]
42 driver = dummy-ups
43 port = evolution500.dev
44 desc = "dummy-ups in dummy mode"
45
46 This file is generally named "something.dev". It contains a list of all
47 valid data and associated values, and has the same format as an upsc(8)
48 dump (<varname>: <value>). So you can easily create definition files
49 from an existing UPS using "upsc > file.dev". It can also be empty, in
50 which case only a basic set of data is available: device., driver.,
51 ups.mfr, ups.model, ups.status
52
53 Samples definition files are available in the "data" directory of the
54 nut source tree, and generally in the sysconfig directory of your
55 system distribution.
56
57 Since dummy-ups will loop on reading this file, you can dynamically
58 modify it to interact with the driver. This will avoid message spam
59 into your system log files, if you are using NUT default configuration.
60
61 You can also use the "TIMER <seconds>" instruction to create scheduled
62 events sequences. For example, the following sequence will loop on
63 switching ups.status between "OL", "OB" and "OB LB" every minute:
64
65 ups.status: OL
66 TIMER 60
67 ups.status: OB
68 TIMER 60
69 ups.status: LB
70 TIMER 60
71
72 It is wise to end the script with a TIMER. Otherwise dummy-ups will
73 directly go back to the beginning of the file.
74
75 Repeater Mode
76 Port is the name of a remote UPS, using the NUT form, ie:
77
78 <upsname>@<hostname>[:<port>]
79
80 For instance:
81
82 [repeater]
83 driver = dummy-ups
84 port = ups@hostname
85 desc = "dummy-ups in repeater mode"
86
87 Unlike UPS specifications in the rest of NUT, the @hostname portion is
88 not optional - it is the @ character which enables Repeater Mode. To
89 refer to an UPS on the same host as dummy-ups, use port =
90 upsname@localhost.
91
93 Once the driver is loaded in dummy mode, you can change any variables,
94 except those of the driver.* and server.* collections. You can do this
95 by either editing the definition file, or use the upsrw(1) and
96 upscmd(1) commands.
97
98 Note that in simulation mode, new variables can be added on the fly, by
99 adding these to the definition file. Conversely, if you need to remove
100 variable (such as transient ones, like ups.alarm), simply update these
101 by setting an empty value. As a result, they will get removed from the
102 data.
103
104 In repeater mode, the driver acts according to the capabilities of the
105 UPS, and so support the same instant commands and settable values.
106
108 Dummy Mode was originally written in one evening to replace the
109 previous dummycons testing driver, which was too limited, and required
110 a terminal for interaction.
111
112 dummy-ups is useful for NUT client development, and other testing
113 purposes.
114
115 It also helps the NUT Quality Assurance effort, by automating some
116 tests on the NUT framework.
117
118 It now offers a repeater mode. This will help in building the Meta UPS
119 approach, which allows one to build a virtual device, composed of
120 several other devices (either UPS, PDUs).
121
123 Instant commands are not yet supported in Dummy Mode, and data need
124 name/value checking enforcement, as well as boundaries or enumeration
125 definition.
126
128 Arnaud Quette
129
131 upscmd(1), upsrw(1), ups.conf(5), nutupsdrv(8)
132
133 Internet Resources:
134 The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
135
136
137
138Network UPS Tools 2.7.3. 12/29/2015 DUMMY-UPS(8)