OpenBSD CVS

CVS log for src/usr.bin/systat/sensors.c


[BACK] Up to [local] / src / usr.bin / systat

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.32 / (download) - annotate - [select for diffs], Wed Jul 15 07:13:56 2020 UTC (3 years, 10 months ago) by kettenis
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, HEAD
Changes since 1.31: +4 -1 lines
Diff to previous 1.31 (colored)

POWE9 CPUs provide an energy sensor that accumulates the emount of energy
used by the processor chip.  Although we have a SENSOR_WATTHOUR sensor
type its units are not really suitable for this sensor.  So add a
SENSOR_ENERGY type that uses micro Joules as its unit.

ok deraadt@

Revision 1.31 / (download) - annotate - [select for diffs], Mon Dec 10 13:35:54 2018 UTC (5 years, 5 months ago) by landry
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.30: +5 -2 lines
Diff to previous 1.30 (colored)

Add a velocity sensor type (displayed as m/s)

Change distance sensor type to be displayed as meters with 3 decimals
instead of millimeters.

ok mpi@ kettenis@

Revision 1.30 / (download) - annotate - [select for diffs], Fri Jan 16 00:03:38 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.29: +3 -2 lines
Diff to previous 1.29 (colored)

first batch of programs adapting to the namespace cleanup
(pfvar.h nameser.h proc.h ucred.h)
ok guenther millert, and some review from doug as well.

Revision 1.29 / (download) - annotate - [select for diffs], Wed Oct 8 04:10:04 2014 UTC (9 years, 7 months ago) by doug
Branch: MAIN
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

userland reallocarray audit.

Replace malloc() and realloc() calls that may have integer overflow in the
multiplication of the size argument with reallocarray().

ok deraadt@

Revision 1.28 / (download) - annotate - [select for diffs], Wed Jul 9 08:04:45 2014 UTC (9 years, 10 months ago) by jasper
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.27: +4 -4 lines
Diff to previous 1.27 (colored)

instead of printf() use tbprintf() like elsewhere in systat.

ok deraadt@ mpi@

Revision 1.27 / (download) - annotate - [select for diffs], Thu Sep 20 20:11:58 2012 UTC (11 years, 8 months ago) by yuo
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.26: +10 -1 lines
Diff to previous 1.26 (colored)

add more sensor types to sensor framework.
 - Pressure (10^-3 Pa)
 - distance (10^-6 m)
 - acceleration (10^-6 m/s^2)

ok deraadt@ reyk@

Revision 1.26 / (download) - annotate - [select for diffs], Fri Sep 16 20:52:48 2011 UTC (12 years, 8 months ago) by yuo
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.25: +13 -10 lines
Diff to previous 1.25 (colored)

reorder SENSOR_* in switch() and add missing cases.

ok deraadt@

Revision 1.25 / (download) - annotate - [select for diffs], Fri Sep 16 15:44:31 2011 UTC (12 years, 8 months ago) by yuo
Branch: MAIN
Changes since 1.24: +6 -2 lines
Diff to previous 1.24 (colored)

apply following changes to sensor framework:
- change accuracy of SENSOR_FREQ from Hz to muHz
- add SENSOR_VOLTS_AC entry to userland programs

ok deraadt@

Revision 1.24 / (download) - annotate - [select for diffs], Wed Mar 2 06:48:17 2011 UTC (13 years, 2 months ago) by jasper
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.23: +5 -7 lines
Diff to previous 1.23 (colored)

- use a common FIELD_ADDR macro, instead of rolling 78 identical copies.

ok canacar@

Revision 1.23 / (download) - annotate - [select for diffs], Wed Apr 21 19:40:59 2010 UTC (14 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

scale angle by 1000000 to permit min.sec accuracy

Revision 1.22 / (download) - annotate - [select for diffs], Wed Apr 21 04:07:13 2010 UTC (14 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.21: +4 -1 lines
Diff to previous 1.21 (colored)

Add the "angle" sensor, measured in degrees; from Luis Pinto

Revision 1.21 / (download) - annotate - [select for diffs], Tue Apr 20 20:49:35 2010 UTC (14 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.20: +9 -6 lines
Diff to previous 1.20 (colored)

Get rid of MAXSENSORDEVICES.  Gaps in sensordev lists are now handled
by returning ENXIO instead of ENOENT, to essentially indicate hotplug
sensor that has gone away.  Accessing beyond the end of the sensordev
list still returns ENOENT, so that you can see there are no further devices.
ok kettenis oga

Revision 1.20 / (download) - annotate - [select for diffs], Tue Apr 20 19:44:07 2010 UTC (14 years, 1 month ago) by oga
Branch: MAIN
Changes since 1.19: +4 -1 lines
Diff to previous 1.19 (colored)

Add "frequency" type for sensors. (and teach userland how to print that
type).  Measured in Hz.

ok deraadt@

Revision 1.19 / (download) - annotate - [select for diffs], Thu Apr 15 04:57:29 2010 UTC (14 years, 1 month ago) by yuo
Branch: MAIN
Changes since 1.18: +4 -1 lines
Diff to previous 1.18 (colored)

add SENSOR_HUMIDITY to sensor framework to handle humidity values

ok kettenis@ xsa@ sobrado@ krw@ deraadt@

Revision 1.18 / (download) - annotate - [select for diffs], Fri Aug 14 15:29:19 2009 UTC (14 years, 9 months ago) by cnst
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.17: +4 -1 lines
Diff to previous 1.17 (colored)

SENSOR_WATTS;  ok canacar deraadt kettenis henning

Revision 1.17 / (download) - annotate - [select for diffs], Thu Jun 25 20:45:43 2009 UTC (14 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

the rule is not to use nitems() in userland yet

Revision 1.16 / (download) - annotate - [select for diffs], Thu Jun 25 20:40:33 2009 UTC (14 years, 10 months ago) by okan
Branch: MAIN
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

sync the SENSOR_DRIVE_* names with sysctl(8)'s

ok canacar@

Revision 1.15 / (download) - annotate - [select for diffs], Thu Jun 25 20:39:02 2009 UTC (14 years, 10 months ago) by okan
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

use the nitems() macro where appropriate

ok canacar@

Revision 1.14 / (download) - annotate - [select for diffs], Sun Dec 7 02:56:06 2008 UTC (15 years, 5 months ago) by canacar
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

Warning cleanup including unused variables and shadowed names

Revision 1.13 / (download) - annotate - [select for diffs], Thu Jun 12 22:26:01 2008 UTC (15 years, 11 months ago) by canacar
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.12: +160 -77 lines
Diff to previous 1.12 (colored)

New display engine for systat, based on pftop. Adds new views for pf
(status, state, rule, queue). While all displays work, some keyboard
comands are not implemented yet. Other features include better handling
of display resize and scrolling for long views. Committing now to fix
the remaining issues in the tree.
Testing and comments by otto@ and harding@, ok deraadt@

Revision 1.12 / (download) - annotate - [select for diffs], Sun Jul 29 04:51:59 2007 UTC (16 years, 9 months ago) by cnst
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.11: +3 -7 lines
Diff to previous 1.11 (colored)

zap redundant code; ok deanna@

Revision 1.11 / (download) - annotate - [select for diffs], Fri Mar 23 14:48:22 2007 UTC (17 years, 2 months ago) by ckuethe
Branch: MAIN
Changes since 1.10: +7 -7 lines
Diff to previous 1.10 (colored)

use the proper abbreviation for second: "s"
requested by deanna, naddy, otto, steven
ok deanna, otto

Revision 1.10 / (download) - annotate - [select for diffs], Fri Mar 23 06:56:40 2007 UTC (17 years, 2 months ago) by ckuethe
Branch: MAIN
Changes since 1.9: +3 -1 lines
Diff to previous 1.9 (colored)

display a timedelta of 0 in seconds, not some other unit.
requested by otto, ok otto

Revision 1.9 / (download) - annotate - [select for diffs], Fri Mar 23 01:10:38 2007 UTC (17 years, 2 months ago) by ckuethe
Branch: MAIN
Changes since 1.8: +56 -5 lines
Diff to previous 1.8 (colored)

Add a routine to scale timedelta sensors to more meaningful units,
like fmt_scaled(3) does. Ranges from picoseconds to days.

Also removes a couple of unneeded curses operations.

ok deanna, ok deraadt

Revision 1.8 / (download) - annotate - [select for diffs], Sun Mar 4 21:17:37 2007 UTC (17 years, 2 months ago) by deanna
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.7: +8 -0 lines
Diff to previous 1.7 (colored)

Clear the display so that the lines don't get overwritten with
hotplugged devices.  Noticed by, similar fix proposed, mbalmer

- Add missing CVS tag; constantine

- Handle SENSOR_S_UNSPEC (do nothing for now).

All discussed with Constanine and mbalmer; ok mbalmer.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Feb 25 22:36:40 2007 UTC (17 years, 2 months ago) by steven
Branch: MAIN
Changes since 1.6: +2 -0 lines
Diff to previous 1.6 (colored)

add missing include, and int return value.

ok deraadt, deanna

Revision 1.6 / (download) - annotate - [select for diffs], Sun Feb 25 18:21:24 2007 UTC (17 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.5: +1 -1 lines
Diff to previous 1.5 (colored)

use the 1 line load line from 'systat vm' on all the other displays, giving
them more room.  much cleaner, and it is less code too; ok deanna

Revision 1.5 / (download) - annotate - [select for diffs], Sat Feb 24 04:01:05 2007 UTC (17 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

some cleanups, i agree; Murenin

Revision 1.4 / (download) - annotate - [select for diffs], Fri Feb 23 22:55:40 2007 UTC (17 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.3: +1 -0 lines
Diff to previous 1.3 (colored)

add missing copyright; Constantine

Revision 1.3 / (download) - annotate - [select for diffs], Fri Feb 23 22:24:22 2007 UTC (17 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +9 -11 lines
Diff to previous 1.2 (colored)

leave unspecified fields blank; ok deanna
also, fix two logic errors in switches.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Feb 23 22:09:53 2007 UTC (17 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +9 -8 lines
Diff to previous 1.1 (colored)

knf

Revision 1.1 / (download) - annotate - [select for diffs], Fri Feb 23 22:02:58 2007 UTC (17 years, 2 months ago) by deanna
Branch: MAIN

Add a display for hardware sensors, available with :sensors.

ok deraadt, jmc

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.