POWERCUT
Section: Network UPS Tools (NUT) (8)
Updated: Mon Oct 10 2009
Index
NAME
powercut - Driver for UPS simulation
NOTE
This man page only documents the specific features of the
powercut driver. For information about the core driver, see
nutupsdrv(8).
DESCRIPTION
This program is a UPS simulation tool. It mimics power outages and allows
you to test client configurations. You should not wait for a real power
cut (or plug out the input cable) if you want to know how your
system will react this challenge.
Switching between ONLINE and ONBATTERY states of simulated UPS may happen
automatically according the preconfigured time intervals or may be
triggered by signals.
IMPLEMENTATION
UPS properties are configured by ups.conf(5) entries like this:
[test]
driver = powercut
port = none
desc = "Simulated UPS for test purposes"
mfr = "Fake manufacturer"
model = "Fake model"
discharge_time = 300
charge time = 90
low_charge = 60
on_off_periods = "330,90, 40,80"
You can declare as many entries, and so run multiple instances, as you need.
Driver parameters
- driver
-
Name of the driver: powercut.
- port
-
A mandatory parameter but not used by powercut. Use /dev/null or
none.
- desc
-
Human readable description of the power supply.
- mfr
-
Human readable manufacturer string. Default: "Artifical Power Cut Inc."
- model
-
Human readable model string. Default: "Blackout Again & Again".
- discharge_time
-
Maximum runtime in seconds. I.e. the time the fully charged battery can supply
power. Default: 300.
- charge_time
-
The time necessary to fully charge an empty battery in seconds.
In the real life this is typically larger than discharge_time by
an order of magnitude. However if you are impatient you can set up
much shorter charge time. Default: 120.
- low_charge
-
The critical level of battery charge in percents. Reaching this usually
initiated shutdown on client machines. Default 50.
- on_off_periods
-
Comma separated (and usually quoted) list of pairs of numbers.
Subsequent numbers give the length of ONLINE/ONBATT periods in seconds.
The simulation always starts with ONLINE state
and 100% battery charge. This takes the given time. Then the driver
gets the next number from the list and mimics power cut for a while.
Then it simulates power back till you defined and so on.
If list is exhausted it is restarted.
Any time you can send signals or instant commands to the process
to alter the predefined schedule. Signal SIGUSR1
(as well as SIGPWR) terminates the current ONLINE period but has no effect
in ONBATT state. In the same way SIGUSR2 switches to ONLINE immediately.
Instant commands test.failure.start and test.failure.stop have
the same effect as SIGUSR1 and SIGUSR2 respectively.
Value -1 in the on_off_periods list means "forever".
In this case you can switch between states manually (i.e. signal or command).
For example "120,480" means an endless 2 min ONLINE - 8 min ONBATT loop.
If you write "-1,300" simulator waits for SIGUSR1 (or test.failure.start
command) then mimics a 5 minute power break.
Default value: "90,90, 180,360". (A short, non-critical power cut
then fast recharge before a loooong blackout with default charge/discharge
times.)
BUGS
It is not fully compliant with NUT driver specification. Config should
be in separate file.
AUTHOR
Gabor Kiss <kissg@ssg.ki.iif.hu>
SEE ALSO
upscmd(1),
ups.conf(5),
upsd.users(5),
nutupsdrv(8),
kill(1)
Index
- NAME
-
- NOTE
-
- DESCRIPTION
-
- IMPLEMENTATION
-
- Driver parameters
-
- BUGS
-
- AUTHOR
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 10:09:21 GMT, October 06, 2009