Commit Graph

30 Commits

Author SHA1 Message Date
wiz
f362df9bd8 Use Dv for ENVSYS_*. 2009-06-15 12:21:33 +00:00
pgoyette
9310b4d9c9 Clarify usage of the function members in struct sysmon_envsys and note
that they're optional.
2009-06-14 23:09:55 +00:00
wiz
2eb8ed9d33 Drop trailing whitespace. 2009-06-14 22:37:43 +00:00
pgoyette
45f4717820 Ooops - {get,set}_limits() need to be sensor-specific. Pass an extra
argument to them to identify the individual sensor being processed.
2009-06-14 19:43:12 +00:00
pgoyette
774ea2bbe8 Remove left-over XXX - thanks wiz@ for pointing this out. 2009-06-13 18:21:55 +00:00
pgoyette
c235777756 Add capability to send sensor limit values to the driver so they can
be programmed into device registers.  This way we can let the hardware
help us out instead of having to always compare the value against each
limit.  (Driver updates for some sensors to take advantage of this
capability will be forthcoming.)
2009-06-13 16:08:25 +00:00
pgoyette
5a84f3060e Since we no longer have individual events for each sensor value limit,
we don't need individual flag bits.  Clean up extra bit definitions.
Bump kernel version - welcome to 5.99.13
2009-06-01 20:08:44 +00:00
wiz
48bffe7f58 Fix spelling. 2009-05-18 12:14:48 +00:00
wiz
60a2941004 Formatting improvements. 2009-05-18 12:13:44 +00:00
wiz
1e4a5a2d99 New sentence, new line. Use \*[Gt] for HTML output.
Punctuation improvements. Other fixes.
2009-05-04 19:28:03 +00:00
ad
0efea177e3 Remove LKMs and switch to the module framework, pass 1.
Proposed on tech-kern@.
2008-11-12 12:35:50 +00:00
martin
11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
xtraeme
51e43163c8 Add three new values for ENVSYS_DRIVE units:
* ENVSYS_DRIVE_OFFLINE, ENVSYS_DRIVE_CHECK and ENVSYS_DRIVE_BUILD
2008-02-28 16:21:34 +00:00
xtraeme
820f120b52 Add ENVSYS_DRIVE_MIGRATING for ENVSYS_DRIVE sensors, this is for RAID
volumes that are migrating such as when you change the stripe size.

While I'm here use the same string than we had in the old framework to
report status "online" vs "drive is online", because the sensor might be
a RAID volume and not just a drive.
2007-12-07 11:47:49 +00:00
xtraeme
53cbf2f68b Improve description for ENVSYS_FMONNOTSUPP. 2007-11-20 10:08:47 +00:00
xtraeme
21ba58354e Indentation fix for the units list. 2007-11-20 09:16:36 +00:00
njoly
e96c994011 Small indentation fix for ENVSYS_BATTERY_CAPACITY_* description list. 2007-11-19 12:13:51 +00:00
xtraeme
8ac95dc8e2 Improve description of sme_refresh and state. 2007-11-17 23:10:00 +00:00
xtraeme
31962fc6e5 Extend the envsys2 API (one more time, sorry) as defined in:
http://mail-index.netbsd.org/tech-kern/2007/11/09/0001.html

sysmon_envsys_create() and sysmon_envsys_destroy() were added to
create/destroy sysmon_envsys objects (and its TAILQ/LIST for sensors/events).

sysmon_envsys_sensor_attach() and sysmon_envsys_sensor_detach() were
added to attach/detach sensors to a specified sysmon_envsys device.

The events framework is now per device and configurable via the
ENVSYS_SETDICTIONARY ioctl or /etc/envsys.conf and envstat(8).

Update all users and documentation to reflect these changes.
2007-11-16 08:00:11 +00:00
xtraeme
b3893f8d6a Sync with latest round of changes and improve vastly sysmon_envsys(9). 2007-11-03 23:05:56 +00:00
xtraeme
7ade6d03ad Fix the problems described in:
http://mail-index.netbsd.org/current-users/2007/07/16/0012.html

- Introduce sme_class into the sysmon_envsys struct to specify a
  class; currently there are two classes: SME_CLASS_ACADAPTER and
  SME_CLASS_BATTERY.

- Add a new envsys event: PENVSYS_EVENT_LOW_POWER that is reached when
  all SME_CLASS_BATTERY devices are in CRITICAL/LOW state and there's not
  any SME_CLASS_ACADAPTER connected.

- Add the 'low-power' event into the sensor_battery script that will
  shutdown the system gracefully via 'shutdown -p'. If powerd(8) is
  not running, cpu_reboot(9) with RB_POWERDOWN is used.

- Make acpiacad(4) a SME_CLASS_ACADAPTER device and acpibat(4) a
  SME_CLASS_BATTERY device.

Update the documentation accordingly to these changes.
2007-10-10 23:25:39 +00:00
xtraeme
877776516d Modify a block that wasn't valid anymore. 2007-09-14 09:20:49 +00:00
xtraeme
b5822e79d4 Update to match current code. 2007-09-04 16:55:02 +00:00
xtraeme
e5707563c8 Document the new sensor units type: ENVSYS_GSTRING and its member
in the envsys_data_t struct.
2007-09-02 20:27:03 +00:00
xtraeme
8972430efc - Remove reference to unexistent sysmon_power(9). (I will work on this
manpage, but no ETA yet).
- Xref envstat(8).
2007-08-28 08:36:18 +00:00
xtraeme
92f4397e50 Explain a bit more about edata->desc being unique in a device. 2007-07-17 17:10:58 +00:00
xtraeme
811e1e2e60 Fix a typo: it's ENVSYS_FPERCENT not ENVSYS_FPERCENTAGE.
Bump date.
2007-07-16 17:37:10 +00:00
xtraeme
c51a1c15bf Add the CODE REFERENCES section. 2007-07-04 17:35:20 +00:00
xtraeme
e719333534 Document the sysctl node to change the refresh value of the callout
function that monitors the sensors.
2007-07-03 22:47:20 +00:00
xtraeme
08d5afa292 Imported envsys 2, a brief description of the new features:
(Part 4: documentation and configuration files)

* Support for detachable sensors.
* Cleaned up the API for simplicity and efficiency.
* Ability to send capacity/critical/warning events to powerd(8).
* Adapted all the code to the new locking order.
* Compatibility with the old envsys API: the ENVSYS_GTREINFO
  and ENVSYS_GTREDATA ioctl(2)s are supported.
* Added support for a 'dictionary based communication channel' between
  sysmon_power(9) and powerd(8), that means there is no 32 bytes event
  size restriction anymore.
* Binary compatibility with old envstat(8) and powerd(8) via COMPAT_40.
* All drivers with the n^2 gtredata bug were fixed, PR kern/36226.

Tested by:

blymn: smsc(4).
bouyer: ipmi(4), mfi(4).
kefren: ug(4).
njoly: viaenv(4), adt7463.c.
riz: owtemp(4).
xtraeme: acpiacad(4), acpibat(4), acpitz(4), aiboost(4), it(4), lm(4).
2007-07-01 07:55:51 +00:00