summaryrefslogtreecommitdiff
path: root/usr.sbin/sensorsd
AgeCommit message (Collapse)Author
2019-09-02More correction of section 3 layout. directory->opendir, fts->fts_open,Theo de Raadt
getcap->cgetent. pwcache->user_from_uid. And then repair references. ok jmc
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2019-05-31Fix previous: create() got inadvertently moved after parse_config(),Ingo Schwarze
which effectively caused the config file to be ignored. So move parse_config() back after create(). OK deraadt@
2019-05-16unveil code was unaware of -f option.Theo de Raadt
From Anton Borowka. ok sthen
2018-12-10Add a velocity sensor type (displayed as m/s)Landry Breuil
Change distance sensor type to be displayed as meters with 3 decimals instead of millimeters. ok mpi@ kettenis@
2018-10-22unveil support is a bit amusing. /etc/sensorsd.conf with "r", andTheo de Raadt
"/" for 'x' so that scripts can be run anywhere in the filesystem (intended behaviour). The latter may seem very permissive, but it is less permissive than "rwxc" .... ok mestre, a while back
2018-01-12Adjust references for sysctl(3) to sysctl(2)Theo de Raadt
2017-07-23Text improvements for precision and clarity, in particular properlyIngo Schwarze
defining the terms "sensor" and "alert", avoiding fuzzy wording like "reporting period" and "state dumping", explaining how Boolean values are represented and that ranges are inclusive, and mentioning the syslog facility used. Also add relevant cross references and drop irrelevant ones. OK jmc@
2017-03-20Add command line option -f to specify alternative config file.Alexander Bluhm
from Matthias Pitzl
2016-08-27Pull in <sys/time.h> for struct timespec, timeval, or clockratePhilip Guenther
ok deraadt@
2015-12-12Remove NULL-checks before free().mmcc
2015-11-19pledge "stdio rpath proc exec"Theo de Raadt
2015-11-19KNFTheo de Raadt
2015-07-27use file system path (.Pa) semantic markup macros where appropriate.Igor Sobrado
ok jmc@
2015-06-15get_val() already frees the buffer passed to it so we don't need toTodd C. Miller
do it in the caller.
2015-06-02Don't leak value returned by cgetstr(). OK deraadt@Todd C. Miller
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2014-08-26Don't single out ami(4) here; other RAID drivers support logicalTodd C. Miller
drive reporting too. OK jsing@
2014-06-29If you want <sys/queue.h>, you need to include it. Don't assume thatTheo de Raadt
<sys/sysctl.h> will pull in the universe (I am working on breaking that assumption in a gentle fashion)
2012-09-20add more sensor types to sensor framework.Yojiro Uo
- Pressure (10^-3 Pa) - distance (10^-6 m) - acceleration (10^-6 m/s^2) ok deraadt@ reyk@
2011-12-03Remove an OpenBSD-specific tweak regarding .Xr spacingIngo Schwarze
and make it compatible with bsd.lv mandoc and with groff-1.21. This tweak was originally added for compatibility with groff-1.15, which is no longer needed. ok jmc@ kristaps@
2011-09-16add lacked cases of sensors value, and fix orders.Yojiro Uo
2011-09-16apply following changes to sensor framework:Yojiro Uo
- change accuracy of SENSOR_FREQ from Hz to muHz - add SENSOR_VOLTS_AC entry to userland programs ok deraadt@
2010-04-21Add the "angle" sensor, measured in degrees; from Luis PintoTheo de Raadt
2010-04-20Get rid of MAXSENSORDEVICES. Gaps in sensordev lists are now handledTheo de Raadt
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
2009-08-14SENSOR_WATTS; ok canacar deraadt kettenis henningConstantine A. Murenin
2008-06-14When there are no sensors, don't run the hotplugging consistency check,Constantine A. Murenin
the logic of which assumes that there is at least one sdlim. ok henning
2008-06-11When a hotplugged sensordev appears, load its configuration individually,Constantine A. Murenin
instead of reloading the configuration for all sensordevs. ok henning
2008-06-11* Remove the exit condition on no sensors at start-up, since we now supportConstantine A. Murenin
hotplugging. * Factor out some code from main() into a new create() procedure, to save some memory and make the code tidier. ok henning
2008-06-11Support hotpluggable sensors (e.g. the post-4.2 ipmi0 created by theConstantine A. Murenin
deferred thread, as well as some timedelta sensors). ok henning, ckuethe
2008-05-12Error out with usage line if additional arguments are given after thePierre-Yves Ritschard
option parsing. Found out the hard way by jdixon on ifstated. ok sobrado@, jdixon@, millert@
2008-03-16s/273.16/273.15/g, then refactor the formulae to ensure that theConstantine A. Murenin
double to int64_t conversions happen sooner rather than later discussed with / ok by kettenis
2008-03-16text simplification;Jason McIntyre
2008-03-16Reduce the number of unnecessary time(3)/gettimeofday(2) calls, and make sureConstantine A. Murenin
that the time always goes forward, so reports are neither duplicated nor lost. Report state changes stabilised through dampening immediately, instead of delay- ing them until the next reporting window; previously, it was common for check() to lag one second behind report(), hence the initial report was delayed one extra minute (this then reduces the number of sleep(3)/nanosleep(2) calls, too). ok ckuethe; some man-page suggestions jmc
2008-03-15explicitly report whether the lower or upper limit is exceeded; ok sthen@ ↵Constantine A. Murenin
ckuethe@
2008-03-14- punctuate and order the tokens list, to stop it looking scrappyJason McIntyre
- it doesn;t make sense to list esm(4) in SEE ALSO
2008-03-14Add a "%l" token to signal whether a sensor value is in or out of bounds,Chris Kuethe
without regard for the specific value. It's a big heavy binary hammer... ok & style feedback from cnst
2008-03-13document the just-committed %s token.Chris Kuethe
ok mbalmer
2008-03-13Allow a program invoked on state change to receive sensor status. PerhapsChris Kuethe
you might want to toggle an error light when a sensor is not OK. Perhaps you might want to schedule a shutdown if a sensor is reporting bad news. Now you can do this, and cancel that pending shutdown (or turn off the error light) if the sensor decides all is well. ok mbalmer (who came up with an almost identical diff months ago) useful feedback and generally positive responses from deraadt, henning, msf
2007-12-05log positive events ('OK', 'within') with LOG_INFO instead of LOG_ALERT;Constantine A. Murenin
partly spotted by bluhm@ grunk@; ok grunk@
2007-11-28sort options list;Jason McIntyre
2007-11-28add options to specify the check and report intervals. ok deraadtTed Unangst
2007-08-14sync printing w/ sysctl(8) and add missing sensor types to conf parser;Constantine A. Murenin
document how values are parsed in sensorsd.conf(5). ok deraadt@; man-page ok/help jmc@
2007-08-14Commentary in the examples section was wrong from the start, because it gaveConstantine A. Murenin
the impression that alerts are only issued when things go wrong, not when they come back to specification -- but this was never the case with sensorsd. Whilst here, also zip some useless examples, as we now have so many. Discussed with jmc@
2007-08-11add caveats section, documenting previously undocumented state dumping ↵Constantine A. Murenin
mechanism; ok jmc@ henning@
2007-08-11s/ and alerter// against previous: 'alerter' is not a standard word (yet),Constantine A. Murenin
even if it is present in certain dictionaries (it is). Also, it doesn't add that much to .Nd anyhow. Requested by jmc@
2007-08-10sync sensorsd.8: add my copyright; change NAME summary; fix some grammar;Constantine A. Murenin
fix description of when the command is executed (it was wrong from the start); say a few more words about automatic monitoring of all sensors that keep state. ok henning@
2007-08-10sync sensorsd.conf.5 with reality, including:Constantine A. Murenin
* add myself to the copyright; remove unneeded synopsis * invalid sensors can now be monitored as such (since c2k7) * manual boundaries for smart sensors are no longer ignored (since c2k7) * populate history with 4.1 and 4.2 additions * add caveats section documenting a long-standing misconception and a workaround some help jmc@; ok jmc@
2007-07-31something went wrong w/ previous;Jason McIntyre
2007-07-31document the -d option of sensorsd; input and ok from jmc@, deraadt@Robert Nagy