On Jul 14, 2015, at 12:50 PM, john hart <jsamcr at yahoo.com> wrote:
> Here is the previous email that I sent directly to Charles Lepple. I am
now sending to the correct email with cc to Charles.
>
> ----------------
>
> I am looking at, and trying to understand the rest of the conf files. But
first want to ask
> about something from this message:
> [CODE]
> root at debian:/home/john# upsdrvctl start
> Network UPS Tools - UPS driver controller 2.7.2
> Network UPS Tools - Megatec/Q1 protocol USB driver 0.11 (2.7.2)
> Supported UPS detected with megatec protocol
> Vendor information unavailable
> No values provided for battery high/low voltages in ups.conf
>
> Using 'guestimation' (low: 10.400000, high: 13.000000)!
> Battery runtime will not be calculated (runtimecal not set)
> [CODE]
>
> I recall, from past experience with this UPS, that the nominal voltage is
around 13.1 . I have
> no idea what the low voltage should be, but 10.4 is probably okay. So,
would I add the following
> in the ups.conf
>
> [CODE]
> default.battery.voltage.high = 13.5
> default.battery.voltage.low = 10.4
> default.battery.voltage.nominal = 13.1
> [CODE]
As mentioned in the man page
<http://www.networkupstools.org/docs/man/blazer_usb.html>, the nominal
voltage is not used in the charge calculation.
Generally, "nominal" battery voltage is a round number, such as 12V
(even though the actual voltage is usually higher).
The man page also defines battery.voltage.high as the "Maximum battery
voltage that is reached after about 12 to 24 hours charging", and
battery.voltage.low as "Minimum battery voltage just before the UPS
automatically shuts down".
Your use of the "default." prefix in ups.conf seems correct, but I
would monitor the battery voltage to get the actual values for high and low.
Plus, you would need to specify runtimecal, which requires some testing at
different load levels.
All of this is for estimating the percent charge, though. The internal UPS low
battery (LB) signal does not depend on this.
> Now, on to the 'upsmon.conf' file. I am a bit lost as to what
all is required in this file.
It depends on what you are trying to do. The configuration is a lot simpler if
you just want to shut down when LB is asserted by the UPS - in that case you do
not need upssched.
> Looking
> at just the first part of the example from Price, I see :
>
> [CODE]
> # /etc/ups/upsmon.conf
> MONITOR Eaton-66781 at localhost 1 upsmaster sekret master
> MINSUPPLIES 1
> SHUTDOWNCMD "/sbin/shutdown -h +0"
> NOTIFYCMD /usr/sbin/upssched
> POLLFREQ 5
> POLLFREQALERT 5
> HOSTSYNC 15
> DEADTIME 15
> POWERDOWNFLAG /etc/killpower
> [CODE]
>
> I have modified the MONITOR line as appropriate for my system but wonder
about a couple
> of entries. The referenced binary '/usr/sbin/upssched' appears to
be in '/sbin' not '/usr/sbin' .
> Is that the '/sbin/upssched' the correct file to use ?
Correct, that is the closest match out of "dpkg --search upssched".
> Also, the '/etc/killpower' does not appear
> anywhere in my system. I did a 'locate killpower' and came up
empty . I now see that the
> killpower is generated automatically (I think).
Correct, as mentioned in the upsmon.conf man page: "upsmon creates this
file when running in master mode when the UPS needs to be powered off. You
should check for this file in your shutdown scripts and call upsdrvctl shutdown
if it exists."
> Also, do I need all of the NOTIFYMSG and NOTIFYFLAG things? I guess I am
looking to do
> the minimum just to get things running. I assume I can modify things later
as I learn enough
> to do so correctly. Looks like the NOTIFYMSG will send a message to a
terminal. Is that correct?
NOTIFYMSG is the format string for the message that gets sent out to the various
notification systems. The part that makes it go to the terminal is the WALL flag
on the NOTIFYFLAG line (for each type of event).
The default is WALL+SYSLOG, so if you don't want terminal messages, you
would specify just SYSLOG for those events.
--
Charles Lepple
clepple at gmail