Subject: Re: envsys version 2 API
To: Juan RP <juan@xtrarom.org>
From: Bill Stouder-Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 05/08/2007 12:41:13
--TRYliJ5NKNqkz5bu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Tue, May 08, 2007 at 08:01:56PM +0200, Juan RP wrote:
> On Tue, 8 May 2007 10:49:00 -0700
> Bill Stouder-Studenmund <wrstuden@netbsd.org> wrote:
>=20
> > I'm not Jason, so I can only guess what exactly he had in mind. But my
> > take on what was being discussed when this came up was to make powerd(8)
> > the main monitoring daemon. Other things that want to monitor the system
> > (snmp, CIM, other stuff) talk to it as opposed to talking directly to =
the
> > kernel. That way we can offer notifiction-based services w/o needing=20
> > polling in the kernel.
> >=20
> > So other tools would issue requests in the form of dictionaries, and ge=
t=20
> > dictionaries as answers.
>=20
> Ok... I know how to add support for handling the critical events in power=
d.
>=20
> My idea is, that with envstat you'll be able to set the high/low critical
> value in a sensor and then if the current value in the driver has exceeded
> it, a PSWITCH_EVENT_CRITICAL event will be sent to powerd.
So what does the polling?
> I added some different PSWITH types as well:
>=20
> PSWITCH_TYPE_ETEMPERATURE
> PSWITCH_TYPE_EFAN
> PSWITCH_TYPE_EVOLTAGE
> PSWITCH_TYPE_EBATTERY
> PSWITCH_TYPE_EDISK
>=20
> And the scripts for them will be something like:
>=20
> /etc/powerd/scripts/sensor_temperature
> /etc/powerd/scripts/sensor_fan
> /etc/powerd/scripts/sensor_voltage
> /etc/powerd/scripts/sensor_battery
> /etc/powerd/scripts/sensor_disk
>=20
> And all them will understand the critical argument. I still have to think
> some more about the disk event (it will require more arguments).
>=20
> I think that's going to rock when I have it finished :-)
Sounds cool!
Take care,
Bil
--TRYliJ5NKNqkz5bu
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)
iD8DBQFGQNJZWz+3JHUci9cRAgoiAJ9o5LIA6BFCrRgM13Tf+uS52g7MywCeIuW6
q5NWz9Iwrs0rmKXotHOkF48=
=fNzu
-----END PGP SIGNATURE-----
--TRYliJ5NKNqkz5bu--