Subject: Re: CVS commit: src
To: Jachym Holecek <freza@NetBSD.org>
From: Juan RP <juan@xtrarom.org>
List: source-changes
Date: 10/11/2007 16:55:57
On Thu, 11 Oct 2007 11:39:59 +0200
Jachym Holecek <freza@NetBSD.org> wrote:

> # Frank Kardel 2007-10-11:
> > I can follow yamt here. I am thinking of servers with
> > multiple power supplies and UPS. With the general abstraction
> > of several power sources with varying capacity we can handle
> > power supply redundancy, ups and batteries with a single concept.
> > Its all then just reduced to a set of power source sensors.
> 
> An UPS is an AC + battery builtin, so it could perhaps just register
> two sensors. And Juan's code already supports multiple ACs/batteries
> I think.
> 
> My point is that I'd like to avoid unnecessary abstraction if sanely
> possible...

Jachym is right, multiple ACs and batteries are supported. Note that I
had this already abstracted and independently of envsys, the concept
was from jmcneill's power resource idea:

http://www.xtrarom.org/~juan/powerres.diff

But IMHO for this specific case the current code is much simpler and
shorter than this one.

It is possible to extend sysmon_envsys(9) with more classes and
abstraction if needed in the future.

-- 
Juan Romero Pardines 	- The NetBSD Project
http://plog.xtrarom.org 	- NetBSD/pkgsrc news in Spanish