[Nut-upsdev] Re: [nut-Patches][303751] Checking UPS Temperature

Arjen de Korte nut+devel at de-korte.org
Fri Jan 5 08:45:09 CET 2007


> Arjen de Korte wrote:
>>
>> Peter Selinger wrote:
>>
>> > One disadvantage of handling it through a script is that is will not
>> > be done by default. Most users probably don't know about the problem
>> > of burning batteries, as it is not very common.
>>
>> Whatever we do, that isn't going to change (sadly). Since we're adding a
>> new function (with possibly bad side effects), the default should be
>> 'off'. Selecting the maximum temperature should be done in 'ups.conf',
>> since it very much depends on the environment in which the UPS is used,
>> there is no default. Setting it too low and you risk nuisance tripping
>> it (and shutting down a system, which isn't going to boot up
>> automatically). On the other hand, too high and you risk burning your
>> UPS without notification (while expecting to be warned for that). Either
>> way, we (as the developers) should *not* take the responsibility. It's
>> probably OK to nag the system administrator if the value is not set, but
>> that's all we can/should do.
>
> Point taken.
>
>> > A potential problem with Eric Wilde's patch is that it is not general
>> > enough; some UPS models have an boolean OVERHEAT flag although they
>> > don't report the actual temperature.
>>
>> Where is this flag defined? While looking for it, I found quite a number
>> of other flags that are not documented in 'docs/new-drivers.txt':
>>
>> ACFAIL
>> AWAITINGPOWER
>> BY
>> CHRG (mentioned in 'docs/acpi.txt')
>> COMMFAULT
>> DEPLETED
>> DISCHRG (mentioned in 'docs/acpi.txt')
>> FAILED
>> HB
>> NOT_APPLICABLE
>> OVERHEAT (mentioned in 'docs/new-names.txt')
>> SD
>> TEST
>> TIP
>> UNKNOWN...
>> VRANGE
>>
>> At the very least, flags should be documented in 'docs/new-drivers.txt',
>> in order to maintain consistency throughout the drivers.
>
> I agree. However, as far as I can see, currently *none* of the status
> flags are documented, not even LB or OB.

I think listing them in 'docs/new-drivers.txt' counts as 'documented':

---8<---

Status data
===========

UPS status flags like on line (OL) and on battery (OB) live in
ups.status.  Don't manipulate this by hand.  There are functions which
will do this for you.

        status_init() - before doing anything else

        status_set(val) - add a status word (OB, OL, etc)

        status_commit() - push out the update

Possible values for status_set:

 OL     - On line
 OB     - On battery (inverter is providing load power)
 LB     - Low battery
 RB     - The battery needs to be replaced
 BYPASS - UPS bypass circuit is active - no battery protection is available
 CAL    - UPS is currently performing runtime calibration (on battery)
 OFF    - UPS is offline and is not supplying power to the load
 OVER   - UPS is overloaded
 TRIM   - UPS is trimming incoming voltage (called "buck" in some hardware)
 BOOST  - UPS is boosting incoming voltage

Anything else will not be recognized by the usual clients.  Coordinate
with me before creating something new, since there will be duplication
and ugliness otherwise.

Note: upsd injects "FSD" by itself following that command by a master
upsmon process.  Drivers must not set that value.

--->8---

Best regards, Arjen




More information about the Nut-upsdev mailing list