The NetBSD Project

CVS log for src/usr.sbin/envstat/envstat.c

[BACK] Up to [cvs.NetBSD.org] / src / usr.sbin / envstat

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.103.2.1 / (download) - annotate - [select for diffs], Fri Nov 3 09:56:39 2023 UTC (3 months, 2 weeks ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Changes since 1.103: +4 -3 lines
Diff to previous 1.103 (colored) next main 1.104 (colored)

Pull up following revision(s) (requested by rin in ticket #450):

	usr.sbin/envstat/envstat.c: revision 1.104

Silence wrong maybe-uninitialized raised by GCC/x86_64 10.4.0 -Os.

Revision 1.104 / (download) - annotate - [select for diffs], Mon Jun 19 03:03:11 2023 UTC (8 months ago) by rin
Branch: MAIN
CVS Tags: HEAD
Changes since 1.103: +4 -3 lines
Diff to previous 1.103 (colored)

Silence wrong maybe-uninitialized raised by GCC/x86_64 10.4.0 -Os.

Revision 1.103 / (download) - annotate - [select for diffs], Mon Nov 21 21:24:02 2022 UTC (15 months ago) by brad
Branch: MAIN
CVS Tags: netbsd-10-base
Branch point for: netbsd-10
Changes since 1.102: +49 -2 lines
Diff to previous 1.102 (colored)



A driver for the Bosch BMP280 / BME280 temperature, humidity and
atmospheric pressure sensor.  This is an inexpensive to moderately
expensive chip available from a large number of places.  The driver
supports all aspects of the two chips, except for the repeating read
mode which would allow for sub-second queries, such as fall detection
or perhaps even as an altimeter.  This driver also only supports the
I2C interface and not the SPI interface.

The BME280, the one with humidity, is not fully tested at this point,
awaiting upon a breakout board and may not show proper humidity.

Revision 1.102 / (download) - annotate - [select for diffs], Sat May 28 10:36:24 2022 UTC (20 months, 3 weeks ago) by andvar
Branch: MAIN
Changes since 1.101: +4 -4 lines
Diff to previous 1.101 (colored)

fix various typos, mainly in comments.

Revision 1.101 / (download) - annotate - [select for diffs], Sat Nov 27 22:30:25 2021 UTC (2 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.100: +3 -3 lines
Diff to previous 1.100 (colored)

usr.sbin: remove unnecessary CONSTCOND, lint no longer needs it

Since 2021-01-31, lint no longer requires a CONSTCOND comment in a
do-while-0 statement since this is a common code pattern, especially in
statement-like macros.

sed -i -E 's,} while \(/\* ?CONSTCOND ?\*/ ?0\),} while (0),' */*.[ch]

Revision 1.100 / (download) - annotate - [select for diffs], Sat Nov 14 16:32:53 2020 UTC (3 years, 3 months ago) by mlelstv
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.99: +111 -87 lines
Diff to previous 1.99 (colored)

Add option -n to print only the value of a sensor.
If statistics are selected with -T, then also display max, min and average.
The empty line between each display is skipped when one or more sensors are
selected with -s.

Revision 1.99 / (download) - annotate - [select for diffs], Sat Nov 14 12:36:49 2020 UTC (3 years, 3 months ago) by mlelstv
Branch: MAIN
Changes since 1.98: +149 -4 lines
Diff to previous 1.98 (colored)

Allow to select raw output for a single device or a list of sensors.

Revision 1.98 / (download) - annotate - [select for diffs], Sat Nov 14 09:11:55 2020 UTC (3 years, 3 months ago) by mlelstv
Branch: MAIN
Changes since 1.97: +9 -4 lines
Diff to previous 1.97 (colored)

For raw output (-x) allow to extract individual properties like drvctl -p.
E.g.

# envstat -x /vcmbox0/0/cur-value
328150000

Revision 1.97 / (download) - annotate - [select for diffs], Sun Jun 7 00:51:48 2020 UTC (3 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.96: +22 -22 lines
Diff to previous 1.96 (colored)

Update for proplib(3) API changes.

Revision 1.95.22.1 / (download) - annotate - [select for diffs], Mon Jun 25 07:26:11 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.95: +48 -2 lines
Diff to previous 1.95 (colored) next main 1.96 (colored)

Sync with HEAD

Revision 1.96 / (download) - annotate - [select for diffs], Sun May 27 01:39:00 2018 UTC (5 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, is-mlppp-base, is-mlppp
Changes since 1.95: +48 -2 lines
Diff to previous 1.95 (colored)

Add support for light sensors that report Illuminance in lux.

Revision 1.91.2.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:05:07 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-maxphys
Changes since 1.91.2.1: +4 -2 lines
Diff to previous 1.91.2.1 (colored) to branchpoint 1.91 (colored) next main 1.92 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.94.6.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:59:27 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.94: +4 -2 lines
Diff to previous 1.94 (colored) next main 1.95 (colored)

Rebase.

Revision 1.95 / (download) - annotate - [select for diffs], Sun May 18 11:46:24 2014 UTC (9 years, 9 months ago) by kardel
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-base, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: pgoyette-compat
Changes since 1.94: +4 -2 lines
Diff to previous 1.94 (colored)

add HYT-221/271/939 humidity/temperature I2C sensor
extend envsys(4) framework by %rH (relative humidity)

Revision 1.91.2.1 / (download) - annotate - [select for diffs], Mon Feb 25 00:30:42 2013 UTC (10 years, 11 months ago) by tls
Branch: tls-maxphys
Changes since 1.91: +22 -32 lines
Diff to previous 1.91 (colored)

resync with head

Revision 1.88.2.3 / (download) - annotate - [select for diffs], Wed Jan 23 00:06:41 2013 UTC (11 years, 1 month ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.88.2.2: +22 -32 lines
Diff to previous 1.88.2.2 (colored) to branchpoint 1.88 (colored) next main 1.89 (colored)

sync with head

Revision 1.94 / (download) - annotate - [select for diffs], Fri Dec 14 05:29:28 2012 UTC (11 years, 2 months ago) by pgoyette
Branch: MAIN
CVS Tags: yamt-pagecache-base9, yamt-pagecache-base8, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, agc-symver-base, agc-symver
Branch point for: tls-earlyentropy
Changes since 1.93: +2 -3 lines
Diff to previous 1.93 (colored)

Since we're no longer making a copy of the option args, we shouldn't
attempt to free it.

Revision 1.93 / (download) - annotate - [select for diffs], Thu Dec 13 20:06:42 2012 UTC (11 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.92: +22 -32 lines
Diff to previous 1.92 (colored)

- no point in allocating memory to hold command line arguments.
- allocate memory inside the function used.

Revision 1.92 / (download) - annotate - [select for diffs], Thu Dec 13 19:31:25 2012 UTC (11 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.91: +3 -2 lines
Diff to previous 1.91 (colored)

PR/47316: Henning Petersen: Memory leak in envstat with config file.

Revision 1.88.2.2 / (download) - annotate - [select for diffs], Wed May 23 10:08:28 2012 UTC (11 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.88.2.1: +5 -5 lines
Diff to previous 1.88.2.1 (colored) to branchpoint 1.88 (colored)

sync with head.

Revision 1.91 / (download) - annotate - [select for diffs], Fri May 11 18:41:12 2012 UTC (11 years, 9 months ago) by njoly
Branch: MAIN
CVS Tags: yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5
Branch point for: tls-maxphys
Changes since 1.90: +5 -5 lines
Diff to previous 1.90 (colored)

Fix alignment display for temperature, fans and integer units.

Revision 1.88.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:09:46 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.88: +4 -4 lines
Diff to previous 1.88 (colored)

sync with head

Revision 1.90 / (download) - annotate - [select for diffs], Thu Feb 9 18:10:26 2012 UTC (12 years ago) by riz
Branch: MAIN
CVS Tags: yamt-pagecache-base4, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since 1.89: +3 -3 lines
Diff to previous 1.89 (colored)

Various English usage, spelling and markup fixes for envstat(4)-related
things, from Snader_LB.

Revision 1.89 / (download) - annotate - [select for diffs], Sun Dec 4 19:34:22 2011 UTC (12 years, 2 months ago) by jmcneill
Branch: MAIN
Changes since 1.88: +3 -3 lines
Diff to previous 1.88 (colored)

change printed indicator and battery charge strings from ON and OFF to TRUE
and FALSE, because messages like "battery present: ON" are difficult for my
brain to parse.

Revision 1.85.4.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:20:46 2011 UTC (12 years, 8 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.85: +80 -76 lines
Diff to previous 1.85 (colored) next main 1.86 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.88 / (download) - annotate - [select for diffs], Tue Jun 7 17:24:32 2011 UTC (12 years, 8 months ago) by pgoyette
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base
Branch point for: yamt-pagecache
Changes since 1.87: +9 -13 lines
Diff to previous 1.87 (colored)

Zero is a valid value for some sensors so update statistics code to
handle that.

Revision 1.87 / (download) - annotate - [select for diffs], Mon Jun 6 20:48:56 2011 UTC (12 years, 8 months ago) by pgoyette
Branch: MAIN
Changes since 1.86: +73 -59 lines
Diff to previous 1.86 (colored)

1. Don't print blank for Integer sensors with value of zero
2. Properly print percentages in -T statistics mode
3. Always set Sensor Type (units) to a non-NULL value
4. Enable printing of percentages for Integer sensors

Revision 1.86 / (download) - annotate - [select for diffs], Sat Jun 4 13:29:02 2011 UTC (12 years, 8 months ago) by pgoyette
Branch: MAIN
Changes since 1.85: +2 -8 lines
Diff to previous 1.85 (colored)

Since there is no longer a value-avg property, remove the code that
extracts it.

Revision 1.85 / (download) - annotate - [select for diffs], Thu Dec 16 14:37:23 2010 UTC (13 years, 2 months ago) by pgoyette
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, cherry-xenmp-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: cherry-xenmp
Changes since 1.84: +2 -3 lines
Diff to previous 1.84 (colored)

When skipping output for a temperature of absolute zero, don't forget to
skip past the display columns that the value would otherwise occupy.

Fixes display issue when swsensor(4) is used and it has a value of 0K,
as reported by njoly@

Revision 1.84 / (download) - annotate - [select for diffs], Tue Dec 14 08:04:14 2010 UTC (13 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.83: +2 -16 lines
Diff to previous 1.83 (colored)

Use a consistent approach for rump kernel calls made by libs.
Should investigate a dynamic approach in the future.

Revision 1.83 / (download) - annotate - [select for diffs], Mon Dec 13 18:00:38 2010 UTC (13 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.82: +12 -25 lines
Diff to previous 1.82 (colored)

RUMP_ACTION -> RUMPPRG

Revision 1.82 / (download) - annotate - [select for diffs], Fri Nov 5 13:52:42 2010 UTC (13 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.81: +4 -5 lines
Diff to previous 1.81 (colored)

adapt to new rumpclient_init() signature

Revision 1.81 / (download) - annotate - [select for diffs], Fri Nov 5 13:42:37 2010 UTC (13 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.80: +56 -18 lines
Diff to previous 1.80 (colored)

support rump client mode

Revision 1.80 / (download) - annotate - [select for diffs], Tue Oct 5 00:14:55 2010 UTC (13 years, 4 months ago) by pgoyette
Branch: MAIN
Changes since 1.79: +44 -3 lines
Diff to previous 1.79 (colored)

Some Integer-type sensors can have limits, so allow them to be displayed.

Revision 1.79 / (download) - annotate - [select for diffs], Thu Aug 26 05:25:57 2010 UTC (13 years, 6 months ago) by jruoho
Branch: MAIN
Changes since 1.78: +17 -18 lines
Diff to previous 1.78 (colored)

Use <paths.h>. Remove trailing white space.

Revision 1.78 / (download) - annotate - [select for diffs], Sun Aug 1 15:39:52 2010 UTC (13 years, 6 months ago) by mlelstv
Branch: MAIN
Changes since 1.77: +3 -3 lines
Diff to previous 1.77 (colored)

Print the correct value for critmin of a fan sensor.

Revision 1.77 / (download) - annotate - [select for diffs], Mon Feb 15 22:37:14 2010 UTC (14 years ago) by pgoyette
Branch: MAIN
Changes since 1.76: +18 -9 lines
Diff to previous 1.76 (colored)

Update userland envstat(8) to handle new {high,maximum}-capacity limits.

Revision 1.76 / (download) - annotate - [select for diffs], Fri Feb 12 14:26:27 2010 UTC (14 years ago) by njoly
Branch: MAIN
Changes since 1.75: +2 -4 lines
Diff to previous 1.75 (colored)

Fix double free, when requesting an invalid sensor.

Revision 1.75 / (download) - annotate - [select for diffs], Fri Feb 12 05:02:40 2010 UTC (14 years ago) by cnst
Branch: MAIN
Changes since 1.74: +13 -8 lines
Diff to previous 1.74 (colored)

remove the fourth (empty) column from the -T printouts; ok pgoyette

Revision 1.74 / (download) - annotate - [select for diffs], Tue Feb 9 05:32:51 2010 UTC (14 years ago) by cnst
Branch: MAIN
Changes since 1.73: +3 -3 lines
Diff to previous 1.73 (colored)

fix a typo resulting in warn-max being shown in two columns (one time instead of crit-min); ok pgoyette

Revision 1.73 / (download) - annotate - [select for diffs], Sat Jan 30 02:56:39 2010 UTC (14 years ago) by pgoyette
Branch: MAIN
Changes since 1.72: +117 -173 lines
Diff to previous 1.72 (colored)

Since we never have both a limit value and a limit %capacity value,
remove the Capacity column.

Reduce inter-column spacing, and display all four limits on one page,
rather than using the -W command line option to switch between critical
and warning limits.  (The -W option is still permitted, but has no
effect.)

%capacity limits are displayed in the WarnMin and CritMin columns, but
have a trailing % sign.

Revision 1.70.6.1 / (download) - annotate - [select for diffs], Wed May 13 19:20:22 2009 UTC (14 years, 9 months ago) by jym
Branch: jym-xensuspend
Changes since 1.70: +20 -11 lines
Diff to previous 1.70 (colored) next main 1.71 (colored)

Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html

Revision 1.70.4.1 / (download) - annotate - [select for diffs], Sat Apr 4 23:40:22 2009 UTC (14 years, 10 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b
Changes since 1.70: +5 -5 lines
Diff to previous 1.70 (colored) next main 1.71 (colored)

Pull up following revision(s) (requested by christos in ticket #666):
	usr.sbin/envstat/envstat.c: revision 1.72
fix pasto: don't print the critcap when the warncap was asked. Also off by
one in length. From Anon-Ymous.
XXX: Should pull up to 5.0

Revision 1.72 / (download) - annotate - [select for diffs], Sat Apr 4 18:43:01 2009 UTC (14 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: matt-premerge-20091211, jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.71: +5 -5 lines
Diff to previous 1.71 (colored)

fix pasto: don't print the critcap when the warncap was asked. Also off by
one in length. From Anon-Ymous.
XXX: Should pull up to 5.0

Revision 1.71 / (download) - annotate - [select for diffs], Sat Feb 14 16:08:22 2009 UTC (15 years ago) by ahoka
Branch: MAIN
Changes since 1.70: +17 -8 lines
Diff to previous 1.70 (colored)

Add support for showing temperatures in Kelvin.

Revision 1.65.2.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:30:04 2008 UTC (15 years, 5 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.65.2.1: +136 -44 lines
Diff to previous 1.65.2.1 (colored) to branchpoint 1.65 (colored) next main 1.66 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.70 / (download) - annotate - [select for diffs], Fri Aug 22 11:27:50 2008 UTC (15 years, 6 months ago) by pgoyette
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, matt-mips64-base2
Branch point for: netbsd-5, jym-xensuspend
Changes since 1.69: +112 -22 lines
Diff to previous 1.69 (colored)

1. provide for warning-min and warning-max alarm levels in addition to
   critical-min and critical-max; also, a battery warning-capacity is
   added in addition to a critical-capacity.

2. usr.sbin/envstat is modified to introduce a -W command line switch to
   display the warning-* values instead of the critical-* values, and
   envstat(8) and envsys.conf(5) man pages are updated appropriately.

3. Treat user-defined limits as a single continuum and generate a single
   event regardless of how many boundaries a change in sensor value
   crosses;  ditto for driver-defined limits.

Fixes my PR/39021
Fixes my PR/39022

OK'd by christos@ bouyer@ cube@

Revision 1.69 / (download) - annotate - [select for diffs], Sat Aug 9 04:49:23 2008 UTC (15 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.68: +26 -24 lines
Diff to previous 1.68 (colored)

simplify the code, from xtraeme.

Revision 1.65.2.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:32:12 2008 UTC (15 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.65: +19 -30 lines
Diff to previous 1.65 (colored)

Sync w/ -current. 34 merge conflicts to follow.

Revision 1.60.2.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:59 2008 UTC (15 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.60.2.1: +19 -30 lines
Diff to previous 1.60.2.1 (colored) to branchpoint 1.60 (colored) next main 1.61 (colored)

sync with head

Revision 1.68 / (download) - annotate - [select for diffs], Sun May 25 20:03:05 2008 UTC (15 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Changes since 1.67: +3 -3 lines
Diff to previous 1.67 (colored)

remove printf when the sensor has no statistics; requested by xtraeme.

Revision 1.67 / (download) - annotate - [select for diffs], Sat May 24 15:55:13 2008 UTC (15 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.66: +6 -13 lines
Diff to previous 1.66 (colored)

Don't code using side-effects (eliminate queue variable). Unconfuses Coverity
CID 5031.

Revision 1.66 / (download) - annotate - [select for diffs], Sat May 24 15:45:58 2008 UTC (15 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.65: +17 -21 lines
Diff to previous 1.65 (colored)

Coverity CID 5034: Use after free. Restructure the code to simplify it and
print the error.

Revision 1.60.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:36:15 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-pf42
Changes since 1.60: +262 -67 lines
Diff to previous 1.60 (colored)

sync with head.

Revision 1.65 / (download) - annotate - [select for diffs], Tue Apr 29 21:46:17 2008 UTC (15 years, 9 months ago) by xtraeme
Branch: MAIN
CVS Tags: yamt-pf42-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.64: +3 -3 lines
Diff to previous 1.64 (colored)

Don't show statistics in sensors that will provide a percentage.

Revision 1.64 / (download) - annotate - [select for diffs], Sat Apr 26 20:58:51 2008 UTC (15 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.63: +3 -3 lines
Diff to previous 1.63 (colored)

Add missing cast, noticed by Paul Goyette in current-users@.

Revision 1.63 / (download) - annotate - [select for diffs], Sat Apr 26 11:28:26 2008 UTC (15 years, 10 months ago) by xtraeme
Branch: MAIN
Changes since 1.62: +3 -3 lines
Diff to previous 1.62 (colored)

Cur -> Current for the header.

Revision 1.62 / (download) - annotate - [select for diffs], Sat Apr 26 11:15:14 2008 UTC (15 years, 10 months ago) by xtraeme
Branch: MAIN
Changes since 1.61: +21 -16 lines
Diff to previous 1.61 (colored)

In default display mode, fix up the indentation for the critical
limits so that they appear in the correct column.

Revision 1.61 / (download) - annotate - [select for diffs], Sat Apr 26 02:56:57 2008 UTC (15 years, 10 months ago) by xtraeme
Branch: MAIN
Changes since 1.60: +257 -67 lines
Diff to previous 1.60 (colored)

* Improve default display output by adding a header that will match
  current value as well as critical limits set and sensor unit.

* Add a new flag: -T. When it's enabled statistics will be created for
  the sensors. Max, min and average statistics as well as sensor unit
  will be displayed. Must be used with an interval.

You can see the new code in action here:

http://www.netbsd.org/~xtraeme/envstat_stats.txt

Thanks to jmcneill@ for comments and ideas.

Revision 1.60 / (download) - annotate - [select for diffs], Thu Apr 17 21:19:12 2008 UTC (15 years, 10 months ago) by xtraeme
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Changes since 1.59: +2 -3 lines
Diff to previous 1.59 (colored)

Remove the 'dvnprinted' bool member of sensor_t, it's unused.

Revision 1.59 / (download) - annotate - [select for diffs], Thu Apr 17 20:51:48 2008 UTC (15 years, 10 months ago) by xtraeme
Branch: MAIN
Changes since 1.58: +230 -234 lines
Diff to previous 1.58 (colored)

* Add support to show output from specified sensors in multiple devices
  via the -s flag (the requirement for -d is not there anymore). [1]

You can do something like the following now:

$ envstat -s "acpibat0:charge,acpibat0:charge state,acpitz0:temperature"
[acpibat0]
       charge:      3.015 Ah (79.70%)
 charge state:     NORMAL
[acpitz0]
  temperature:     54.000 degC
$

* As bonus, the code has been modified to use a simple queue for
  the sensors, and this has simplified and improved some parts of the
  code as well.

[1] Item requested by joerg@ yesterday.

Revision 1.42.2.2 / (download) - annotate - [select for diffs], Wed Jan 9 02:01:59 2008 UTC (16 years, 1 month ago) by matt
Branch: matt-armv6
Changes since 1.42.2.1: +57 -18 lines
Diff to previous 1.42.2.1 (colored) next main 1.43 (colored)

sync with HEAD

Revision 1.58 / (download) - annotate - [select for diffs], Fri Nov 16 08:01:38 2007 UTC (16 years, 3 months ago) by xtraeme
Branch: MAIN
CVS Tags: matt-armv6-nbase, matt-armv6-base, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, cube-autoconf-base, cube-autoconf
Changes since 1.57: +57 -18 lines
Diff to previous 1.57 (colored)

Implement the 'refresh-timeout' property in device blocks for the
configuration files. This sets the timeout value that will be used
to check for critical limits.

The value can be viewed by the 'envstat -D' command.

Revision 1.42.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:36:25 2007 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.42: +211 -421 lines
Diff to previous 1.42 (colored)

sync with HEAD

Revision 1.57 / (download) - annotate - [select for diffs], Sat Nov 3 23:05:22 2007 UTC (16 years, 3 months ago) by xtraeme
Branch: MAIN
Changes since 1.56: +15 -11 lines
Diff to previous 1.56 (colored)

- Rename ENVSYS_BATTERY_STATE units to ENVSYS_BATTERY_CAPACITY and
  introduce ENVSYS_BATTERY_CHARGE, which is the same than an Indicator and
  it's used to know if the battery is currently charging or discharging.

- Require two sensors at least for SME_CLASS_BATTERY to make the low-power
  condition work: a ENVSYS_BATTERY_CAPACITY plus ENVSYS_BATTERY_CHARGE.

- Simplify sme_event_check_lowpower() and make it check the required
  sensors in the SME_CLASS_ACADAPTER and SME_CLASS_BATTERY classes.
  If the acadapter is not ready, trust the state returned by the battery
  device.

Based on suggestion from joerg@.

Revision 1.22.2.1 / (download) - annotate - [select for diffs], Mon Oct 15 05:09:58 2007 UTC (16 years, 4 months ago) by riz
Branch: netbsd-3
Changes since 1.22: +9 -2 lines
Diff to previous 1.22 (colored) next main 1.23 (colored)

Pull up following revisions via patch (requested by bouyer in ticket #1838):
	distrib/sets/lists/man/mi: revision 1.997
	sbin/bioctl/strtonum.c: revision 1.1
	sys/dev/Makefile: revision 1.25
	sys/arch/amd64/conf/GENERIC: revision 1.139
	sbin/bioctl/strtonum.h: revision 1.1
	sys/dev/bio.c: revision 1.1
	sbin/bioctl/bioctl.c: revision 1.1
	share/man/man4/bio.4: revision 1.1
	sbin/bioctl/bioctl.8: revision 1.1
	sys/sys/envsys.h: revision 1.11
	sbin/bioctl/bioctl.8: revision 1.3
	sbin/bioctl/bioctl.8: revision 1.4
	sys/arch/i386/conf/XEN2_DOM0: revision 1.25
	distrib/sets/lists/base/mi: revision 1.704
	sys/conf/majors: revision 1.34
	share/man/man4/Makefile: revision 1.426
	etc/MAKEDEV.tmpl: revision 1.86
	sys/arch/i386/conf/GENERIC: revision 1.825
	distrib/sets/lists/comp/mi: revision 1.1022
	sys/conf/files: revision 1.839
	usr.sbin/envstat/envstat.c: revision 1.24
	sbin/Makefile: revision 1.105
	sys/dev/ic/mfi.c: revision 1.4
	sys/dev/biovar.h: revision 1.1
	sys/dev/ic/mfivar.h: revision 1.4
	sbin/bioctl/Makefile: revision 1.1
Fix typo.
Add bio(4) and associated bioctl(8) from OpenBSD, a driver control block
device controllers, and more specifically raid controllers.
Add a new sensor type, ENVSYS_DRIVE, to report drive status. From OpenBSD.
Add bio and sysmon support to mfi(4). This allow userland to query
status for drives and logical volumes attached to a mfi(4) controller. While
there fix some debug printfs in mfi so they compile.
Add bio(4) to amd64 and i386 GENERIC.
Add bio(4) and associated bioctl(8) from OpenBSD, a driver control block
device controllers, and more specifically raid controllers.
Add a new sensor type, ENVSYS_DRIVE, to report drive status. From OpenBSD.
Add bio and sysmon support to mfi(4). This allow userland to query
status for drives and logical volumes attached to a mfi(4) controller. While
there fix some debug printfs in mfi so they compile.
Add bio(4) to amd64 and i386 GENERIC.
Fix Dd argument (use full month names).
Use more markup.
Comment out references to safte(4) and softraid(4), which don't exist in
NetBSD.
Remove trailing whitespace.
Use macros instead of characters for HTML output (replace ">", "<"
with \*[Gt], \*[Lt]).
Sort sections.
Create /dev/bio

Revision 1.56 / (download) - annotate - [select for diffs], Sun Oct 7 04:16:48 2007 UTC (16 years, 4 months ago) by xtraeme
Branch: MAIN
Changes since 1.55: +119 -342 lines
Diff to previous 1.55 (colored)

New configuration file format for the envsys framework:

foo0 {
	#
	# CPU Temperature
	#
	sensor0 {
		critical-max = 70C;
		critical-min = 20C;
	}
	...
}
...

Removed the -m flag that was previously used to set properties for
sensors. Now the -c flag will process all properties specified in
the file (accepted as argument).

To remove all properties that were set, the new -S flag can be used.
This will restore default values for all devices.

Revision 1.55 / (download) - annotate - [select for diffs], Tue Sep 25 15:09:32 2007 UTC (16 years, 5 months ago) by xtraeme
Branch: MAIN
Changes since 1.54: +5 -15 lines
Diff to previous 1.54 (colored)

- Simplify find_sensors().
- Remove a block that is not used anymore in check_sensors().

Revision 1.54 / (download) - annotate - [select for diffs], Tue Sep 25 14:20:49 2007 UTC (16 years, 5 months ago) by xtraeme
Branch: MAIN
Changes since 1.53: +65 -60 lines
Diff to previous 1.53 (colored)

Merge a patch from Iain Hibbert (plunky@):

- some unclear language cleaned up
- inconsistent usage of 'device' and 'driver' to refer to the same thing
- difficult error handling

And print the device name if -d flag is not specified for any driver
registered, e.g:

$ envstat
[aiboost0]
  CPU Temperature:     36.000 degC  max:   70.000 degC  min:   15.000 degC
   MB Temperature:     38.000 degC  max:   50.000 degC  min:   15.000 degC
    Vcore Voltage:      1.232 V     max:    1.350 V     min:    1.150 V
     +3.3 Voltage:      3.264 V     max:    3.500 V     min:    3.000 V
       +5 Voltage:      5.017 V     max:    5.600 V     min:    4.500 V
      +12 Voltage:     11.932 V     max:   13.500 V     min:   11.200 V
    CPU FAN Speed:       1268 RPM
$

Revision 1.53 / (download) - annotate - [select for diffs], Thu Sep 20 18:38:49 2007 UTC (16 years, 5 months ago) by plunky
Branch: MAIN
Changes since 1.52: +8 -8 lines
Diff to previous 1.52 (colored)

sort options

Revision 1.52 / (download) - annotate - [select for diffs], Mon Sep 10 17:41:26 2007 UTC (16 years, 5 months ago) by xtraeme
Branch: MAIN
Changes since 1.51: +2 -2 lines
Diff to previous 1.51 (colored)

Another typo in a comment.

Revision 1.51 / (download) - annotate - [select for diffs], Mon Sep 10 17:40:44 2007 UTC (16 years, 5 months ago) by xtraeme
Branch: MAIN
Changes since 1.50: +5 -5 lines
Diff to previous 1.50 (colored)

Fix a comment.

Revision 1.50 / (download) - annotate - [select for diffs], Mon Sep 10 17:39:14 2007 UTC (16 years, 5 months ago) by xtraeme
Branch: MAIN
Changes since 1.49: +6 -5 lines
Diff to previous 1.49 (colored)

Check argc before calling open(2), and use the out label in another
error case.

Revision 1.49 / (download) - annotate - [select for diffs], Mon Sep 10 14:25:17 2007 UTC (16 years, 5 months ago) by xtraeme
Branch: MAIN
Changes since 1.48: +1 -3 lines
Diff to previous 1.48 (colored)

Fix a lint(1) warning and remove oldsize in print_sensors(), it's
not used.

Revision 1.48 / (download) - annotate - [select for diffs], Mon Sep 10 14:15:11 2007 UTC (16 years, 5 months ago) by xtraeme
Branch: MAIN
Changes since 1.47: +15 -9 lines
Diff to previous 1.47 (colored)

Don't forget to check if -s was specified without -d, and add a macro
to check it in two places.

Revision 1.47 / (download) - annotate - [select for diffs], Mon Sep 10 13:58:50 2007 UTC (16 years, 5 months ago) by xtraeme
Branch: MAIN
Changes since 1.46: +16 -33 lines
Diff to previous 1.46 (colored)

Redo how the arguments are processed, so that arguments not allowed
will call usage(). Also remove an extra free().

Revision 1.46 / (download) - annotate - [select for diffs], Tue Sep 4 16:54:37 2007 UTC (16 years, 5 months ago) by xtraeme
Branch: MAIN
Changes since 1.45: +13 -12 lines
Diff to previous 1.45 (colored)

Update to match current kernel code.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Sep 2 21:25:25 2007 UTC (16 years, 5 months ago) by xtraeme
Branch: MAIN
Changes since 1.44: +32 -21 lines
Diff to previous 1.44 (colored)

Add the -I flag that skips sensors with invalid state. They are shown
by default, but this is for users that don't want to print them.

Revision 1.44 / (download) - annotate - [select for diffs], Sun Sep 2 19:36:59 2007 UTC (16 years, 5 months ago) by xtraeme
Branch: MAIN
Changes since 1.43: +14 -2 lines
Diff to previous 1.43 (colored)

Add a new sensor type to sysmon_envsys(9): ENVSYS_GSTRING.

ENVSYS_GSTRING (aka Generic String) uses the genstr member in
the envsys_data_t struct to add a generic string that envstat(8)
will show as value or state.

It's like the ENVSYS_DRIVER, but doesn't use value_cur. Below
is the dictionary created on these sensors:

<dict>
	<key>description</key>
	<string>acpibat0 charge state</string>
	<key>generic-state-string</key>
	<string>NORMAL</string>
	<key>monitoring-supported</key>
	<false/>
	<key>state</key>
	<string>valid</string>
	<key>type</key>
	<string>Generic string</string>
</dict>

Note that it's limited to 32 chars, but we can grow it if needed.

envstat(8) will print ENVSYS_GSTRING sensors as:

$ envstat -dacpibat0 -s"acpibat0 charge state"
  acpibat0 charge state:     NORMAL
$

Revision 1.43 / (download) - annotate - [select for diffs], Wed Aug 29 16:55:17 2007 UTC (16 years, 5 months ago) by xtraeme
Branch: MAIN
Changes since 1.42: +5 -3 lines
Diff to previous 1.42 (colored)

In temperature sensors, do not convert to degC or degF if there's
no value returned.

Revision 1.42 / (download) - annotate - [select for diffs], Sun Aug 26 10:20:33 2007 UTC (16 years, 6 months ago) by xtraeme
Branch: MAIN
Branch point for: matt-armv6
Changes since 1.41: +6 -1 lines
Diff to previous 1.41 (colored)

Check if the dictionary is empty and print a message if it's true.

Revision 1.41.2.2 / (download) - annotate - [select for diffs], Sun Aug 5 23:20:45 2007 UTC (16 years, 6 months ago) by xtraeme
Branch: matt-mips64
Changes since 1.41.2.1: +942 -0 lines
Diff to previous 1.41.2.1 (colored) to branchpoint 1.41 (colored) next main 1.42 (colored)

The caller of prop_dictionary_externalize is responsible to free the
returned buffer... make it so. Reminded by prop_dictionary(3).

Revision 1.41.2.1, Sun Aug 5 23:20:44 2007 UTC (16 years, 6 months ago) by xtraeme
Branch: matt-mips64
Changes since 1.41: +0 -942 lines
FILE REMOVED

file envstat.c was added on branch matt-mips64 on 2007-08-05 23:20:45 +0000

Revision 1.41 / (download) - annotate - [select for diffs], Sun Aug 5 23:20:44 2007 UTC (16 years, 6 months ago) by xtraeme
Branch: MAIN
CVS Tags: matt-mips64-base
Branch point for: matt-mips64
Changes since 1.40: +7 -5 lines
Diff to previous 1.40 (colored)

The caller of prop_dictionary_externalize is responsible to free the
returned buffer... make it so. Reminded by prop_dictionary(3).

Revision 1.40 / (download) - annotate - [select for diffs], Sat Jul 21 11:11:10 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
CVS Tags: hpcarm-cleanup
Changes since 1.39: +18 -4 lines
Diff to previous 1.39 (colored)

Erm... fix previous.

Revision 1.39 / (download) - annotate - [select for diffs], Sat Jul 21 10:59:57 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored)

Fix a logic bug: report a message and error if -s or -m is being used
without -d.

Revision 1.38 / (download) - annotate - [select for diffs], Tue Jul 17 18:15:02 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.37: +8 -6 lines
Diff to previous 1.37 (colored)

Return the value returned by prop_dictionary_recv_ioctl() if the -x flag
is specified too.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Jul 17 17:40:59 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.36: +14 -9 lines
Diff to previous 1.36 (colored)

- Return the value returned by prop_dictionary_{recv,send}_ioctl
  in all cases.
- Skip sensors that do not have a description object in its dictionary.

Revision 1.36 / (download) - annotate - [select for diffs], Tue Jul 17 15:43:08 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.35: +10 -1 lines
Diff to previous 1.35 (colored)

Only allow to use ENVSYS_SETDICTIONARY if the user has write permission
in the /dev/sysmon device.

Use O_RDONLY for ENVSYS_GETDICTIONARY and O_RDWR for ENVSYS_SETDICTIONARY
in envstat(8).

Fixes PR kern/36661 by YAMAMOTO Takashi.

Revision 1.35 / (download) - annotate - [select for diffs], Tue Jul 17 13:12:46 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.34: +9 -3 lines
Diff to previous 1.34 (colored)

Add the -r flag, which is a dummy flag... only added for compatibility
reasons.

Revision 1.34 / (download) - annotate - [select for diffs], Fri Jul 13 00:42:57 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.33: +37 -46 lines
Diff to previous 1.33 (colored)

Define a set of macros to avoid writting same code many times.

Revision 1.33 / (download) - annotate - [select for diffs], Thu Jul 12 22:52:54 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.32: +8 -15 lines
Diff to previous 1.32 (colored)

Add a missing printf in parse_dictionary() and simplify this part to
avoid code duplication in two places.

Revision 1.32 / (download) - annotate - [select for diffs], Thu Jul 12 18:34:07 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.31: +1 -3 lines
Diff to previous 1.31 (colored)

Remove a comment that is not valid anymore.

Revision 1.31 / (download) - annotate - [select for diffs], Thu Jul 12 18:24:35 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.30: +83 -51 lines
Diff to previous 1.30 (colored)

- Do not refrence memory already freed, thanks to Geoff C. Wing for
  the analysis. Closes PR bin/36636.
- Also use the longest string for the column alignment counting all
  sensors available from all devices, not per-device.

Thanks to rmind@ for help.

Revision 1.30 / (download) - annotate - [select for diffs], Thu Jul 5 14:11:08 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

Align drive state string like other sensor types.

Revision 1.29 / (download) - annotate - [select for diffs], Thu Jul 5 14:08:37 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.28: +19 -33 lines
Diff to previous 1.28 (colored)

Before checking sensor type:

- check if if its state is invalid
- print the 'N/A' string and continue

This avoids code duplication.

Revision 1.28 / (download) - annotate - [select for diffs], Thu Jul 5 13:51:28 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.27: +4 -6 lines
Diff to previous 1.27 (colored)

Print invalid state with 'N/A' for Indicators, like any other sensors.

We follow the following scheme now:

value_cur set => ON
value_cur not set => OFF
invalid state => N/A

Revision 1.27 / (download) - annotate - [select for diffs], Thu Jul 5 12:11:05 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.26: +15 -12 lines
Diff to previous 1.26 (colored)

Print 'N/A' for invalid sensors rather than an asterisk, with the
exception of Indicator sensors.

Indicator sensors now will print "ON" if they are in valid state, or
"OFF" if they are in invalid state.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Jul 4 19:56:02 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.25: +28 -17 lines
Diff to previous 1.25 (colored)

By popular demand, do not skip sensors with invalid state. Print them
with an asterisk, as was suggested by Greg. A. Woods.

Example:

$ ./envstat -dlm0 -s "CPU Fan,System Fan,Aux Fan"
     System Fan:       *
     CPU Fan:       1308 RPM
     Aux Fan:          *
$

Except Integer and Driver sensors, which shouldn't need that.

Revision 1.25 / (download) - annotate - [select for diffs], Sun Jul 1 07:39:46 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.24: +751 -371 lines
Diff to previous 1.24 (colored)

Imported envsys 2, a brief description of the new features:
(Part 3: userland)

* 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).

Revision 1.23.2.1 / (download) - annotate - [select for diffs], Tue May 8 10:45:17 2007 UTC (16 years, 9 months ago) by pavel
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0
Changes since 1.23: +9 -2 lines
Diff to previous 1.23 (colored) next main 1.24 (colored)

Pull up following revision(s) (requested by bouyer in ticket #603):
	distrib/sets/lists/base/mi: revision 1.704
	distrib/sets/lists/comp/mi: revision 1.1022
	distrib/sets/lists/man/mi: revision 1.997
	doc/CHANGES: revision 1.839
	sbin/Makefile: patch
	sbin/bioctl/Makefile: revision 1.1
	sbin/bioctl/bioctl.8: revision 1.1
	sbin/bioctl/bioctl.c: revision 1.1
	sbin/bioctl/strtonum.c: revision 1.1
	sbin/bioctl/strtonum.h: revision 1.1
	share/man/man4/Makefile: revision 1.426
	share/man/man4/bio.4: revision 1.1
	sys/arch/amd64/conf/GENERIC: revision 1.139
	sys/arch/i386/conf/GENERIC: revision 1.825
	sys/arch/i386/conf/XEN2_DOM0: revision 1.25
	sys/conf/files: revision 1.839
	sys/conf/majors: patch
	sys/dev/Makefile: revision 1.25
	sys/dev/bio.c: patch
	sys/dev/biovar.h: patch
	sys/dev/ic/mfi.c: revision 1.4-1.5
	sys/dev/ic/mfivar.h: revision 1.4
	sys/sys/envsys.h: revision 1.11
	usr.sbin/envstat/envstat.c: revision 1.24
Add bio(4) and associated bioctl(8) from OpenBSD, a driver control block
device controllers, and more specifically raid controllers.
Add a new sensor type, ENVSYS_DRIVE, to report drive status. From OpenBSD.
Add bio and sysmon support to mfi(4). This allow userland to query
status for drives and logical volumes attached to a mfi(4) controller. While
there fix some debug printfs in mfi so they compile.
Add bio(4) to amd64 and i386 GENERIC.

note bio(4), envsys(4) DRIVE, and mfi(4) support for both.

tred->sensor is a u_int.

Revision 1.24 / (download) - annotate - [select for diffs], Tue May 1 17:18:56 2007 UTC (16 years, 9 months ago) by bouyer
Branch: MAIN
Changes since 1.23: +9 -2 lines
Diff to previous 1.23 (colored)

Add bio(4) and associated bioctl(8) from OpenBSD, a driver control block
device controllers, and more specifically raid controllers.
Add a new sensor type, ENVSYS_DRIVE, to report drive status. From OpenBSD.
Add bio and sysmon support to mfi(4). This allow userland to query
status for drives and logical volumes attached to a mfi(4) controller. While
there fix some debug printfs in mfi so they compile.
Add bio(4) to amd64 and i386 GENERIC.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Aug 31 10:25:04 2006 UTC (17 years, 5 months ago) by gson
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.22: +3 -2 lines
Diff to previous 1.22 (colored)

In -i mode, flush standard output after each line.  This is needed to
make the output appear in a timely fashion when redirected to a file
or pipe.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Jun 3 16:48:53 2004 UTC (19 years, 8 months ago) by wiz
Branch: MAIN
CVS Tags: netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: netbsd-3
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)

One r in the option string is enough; from Jeff Ito.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Jun 3 15:47:04 2004 UTC (19 years, 8 months ago) by wiz
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

Remove unhandled option letter c from option string, noted by Jeff Ito.

Revision 1.20 / (download) - annotate - [select for diffs], Thu Jun 3 14:51:32 2004 UTC (19 years, 8 months ago) by wiz
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

Sync usage with man page.
From Kouichirou Hiratsuka in PR 25798.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Mar 25 01:26:57 2004 UTC (19 years, 11 months ago) by mrg
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2
Changes since 1.18: +72 -51 lines
Diff to previous 1.18 (colored)

- move the row printing code into it's own function.
- pay attention to interval processing with row printing (-r -iN).

the latter fixes PR#24522.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Mar 21 10:52:26 2004 UTC (19 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.17: +6 -3 lines
Diff to previous 1.17 (colored)

in -r mode, if given "-s sensor_list", only list the given sensors instead
of always listing them all

Revision 1.17 / (download) - annotate - [select for diffs], Mon Feb 2 10:36:19 2004 UTC (20 years ago) by soren
Branch: MAIN
Changes since 1.16: +4 -4 lines
Diff to previous 1.16 (colored)

As pointed out by Dave Huang, revert back to using 273.15 rather than 273.16
when converting between kelvin and celsius.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Feb 2 07:55:14 2004 UTC (20 years ago) by soren
Branch: MAIN
Changes since 1.15: +4 -4 lines
Diff to previous 1.15 (colored)

C = K + 273.16.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jan 5 23:23:38 2004 UTC (20 years, 1 month ago) by jmmv
Branch: MAIN
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.

Revision 1.14 / (download) - annotate - [select for diffs], Fri Oct 31 20:37:53 2003 UTC (20 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.13: +31 -45 lines
Diff to previous 1.13 (colored)

Don't display data for sensors with ENVSYS_FCURVALID not set.
Clean up a little.

Revision 1.13 / (download) - annotate - [select for diffs], Fri Feb 21 07:23:43 2003 UTC (21 years ago) by martin
Branch: MAIN
Changes since 1.12: +5 -5 lines
Diff to previous 1.12 (colored)

Not all size_t's are equal to int...

Revision 1.12 / (download) - annotate - [select for diffs], Thu Feb 20 20:57:08 2003 UTC (21 years ago) by christos
Branch: MAIN
Changes since 1.11: +51 -57 lines
Diff to previous 1.11 (colored)

- pass lint
- use size_t where appropriate
- use err/warn instead of printf, and don't hide the error messages from ioctl.
- keep units in sync (someone added integer in the header file and forgot
  to update envsys.c)

Revision 1.11 / (download) - annotate - [select for diffs], Sat Jan 11 23:44:47 2003 UTC (21 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

fix usage [add -r]

Revision 1.10 / (download) - annotate - [select for diffs], Sun Jan 5 22:16:22 2003 UTC (21 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

exit 0 when -r

Revision 1.9 / (download) - annotate - [select for diffs], Sun Jan 5 01:56:42 2003 UTC (21 years, 1 month ago) by chris
Branch: MAIN
Changes since 1.8: +35 -4 lines
Diff to previous 1.8 (colored)

Update -r option to display data in correct units, IE temperature in degC or
degF, fan speed is now correct, and indicators will now show ON/OFF.

Revision 1.8 / (download) - annotate - [select for diffs], Wed Jan 1 12:16:40 2003 UTC (21 years, 1 month ago) by augustss
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.7: +3 -4 lines
Diff to previous 1.7 (colored)

Include <paths.h>

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jan 1 12:14:21 2003 UTC (21 years, 1 month ago) by augustss
Branch: MAIN
Changes since 1.6: +24 -51 lines
Diff to previous 1.6 (colored)

ANSIfy.

Revision 1.6 / (download) - annotate - [select for diffs], Tue Dec 31 05:27:44 2002 UTC (21 years, 1 month ago) by explorer
Branch: MAIN
Changes since 1.5: +57 -12 lines
Diff to previous 1.5 (colored)

add ENVSYS_INDICATOR and ENVSYS_INTEGER types

Revision 1.5 / (download) - annotate - [select for diffs], Mon Feb 19 23:22:43 2001 UTC (23 years ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Changes since 1.4: +4 -4 lines
Diff to previous 1.4 (colored)

convert to use getprogname()

Revision 1.2.4.1 / (download) - annotate - [select for diffs], Sun Jul 30 17:58:24 2000 UTC (23 years, 6 months ago) by bouyer
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Changes since 1.2: +22 -30 lines
Diff to previous 1.2 (colored) next main 1.3 (colored)

Pull up (requested by thorpej):
envstat.8 1.1->1.2
envstat.c 1.2->1.3

If the `device' argument is not specified, attempt to open /dev/sysmon.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Jul 2 00:55:47 2000 UTC (23 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.3: +4 -4 lines
Diff to previous 1.3 (colored)

Indicate that the device argument is not mandatory.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Jun 24 00:41:11 2000 UTC (23 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.2: +22 -30 lines
Diff to previous 1.2 (colored)

If the `device' argument is not specified, attempt to open /dev/sysmon.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Apr 14 06:26:53 2000 UTC (23 years, 10 months ago) by simonb
Branch: MAIN
CVS Tags: netbsd-1-5-base, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.1: +2 -4 lines
Diff to previous 1.1 (colored)

Don't declare 'extern opt*' getopt variables.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Mar 10 05:51:58 2000 UTC (23 years, 11 months ago) by groo
Branch: MAIN

Add envstat(8) for displaying sensor readings from any envsys(4)
compatible device.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>