[gpm] Re: ideas for a new UPS infrastructure



Richard Hughes writes: 
> On Fri, 2006-03-10 at 01:11 +0100, Stanislav Brabec wrote:
> > Hallo NUT developers.

> > upsd-network-hald-addon listens to network UPSes and provides HAL device
> > 
> > upsmon listens to D-BUS and provides interface for grafical old
> > fashioned NUT clients
> 
> I'm not sure how to integrate network UPS's into the current HAL
> framework, as hardware not attached to the computer is sort of anti-HAL.

This remembers again to me my initial discussion with Holger Macht. The
problem is the fact, that noone else can create HAL events. Second
problem is, that currently all local HID UPSes are considered as "power
critical devices" by powermanager. This may not be true (see the bottom
of this mail).


Random thoughts on remote UPSes in HAL

We can do:

1. Define conditions, when it is acceptable to add remote devices to HAL
in such special cases.
This remote UPS may be de-facto (but also may not) local device, because
if it goes down, my machine goes down, too.

2. Clone HAL UPS interface to another D-BUS domain. All applications
will have to listen to two D-BUS interfaces with the same syntax. This
is AFAIK ugly, because it requires change of all applications.
/org/freedesktop/Hal/devices/usb_device_51d_2_AS0333131933_if0_hiddev
  battery.type = 'ups'
/org/freedesktop/UPS/nut_network_ups/myserver/mysmartups
  battery.type = 'ups'

3. Do both upper mentioned. Define two UPS categories: "UPSes directly
affecting my machine" (and announce them via HAL), "random remote
UPSes" (and annonce them via cloned interface).

This may look ugly, but it is logical - desktop tools, power manager
etc. will use only "UPSes directly affecting my work" from HAL, admin
tools can look to both. Even local HID UPS may not affect me.


David Zeuthen writes:
> So.. I guess I'm saying that at this point I'm very interested in the
> driver code from NUT but not so much the other bits.

You should be interested in upsmon logic, too.

Example of "bizzare" UPS configuration from
http://www.networkupstools.org/features/

This machine can run, if at least two two of these three UPSes has
enough power: "local UPS Smart UPS 1000 hiddev0", "local UPS Smart UPS
1000 hiddev1", "remote UPS spare1 connected to machine upsfarm". Ignore
status of "local UPS Back UPS 500 hiddev2", which powers another machine
(but this UPS and machine connected to it must be shot down, before this
server will go down).


-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SuSE CR, s. r. o.                             e-mail: sbrabec suse cz
Drahobejlova 27                               tel: +420 296 542 382
190 00 Praha 9                                fax: +420 296 542 374
Czech Republic                                http://www.suse.cz/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]