summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sensorsd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* sensorsd(8) reported an unveil failure due to chdir / . Callbluhm2020-07-221-7/+11
| | | | | | | chdir(2) before unveil(2). Use absolute config path after chdir, also necessary for SIGHUP. /etc/sensorsd.conf.db must be unveiled, cgetent(3) tries to open it. OK beck@
* briefly mention /etc/examples/ in the FILES section of all theschwarze2020-02-101-3/+5
| | | | | manual pages that document the corresponding configuration files; OK jmc@, and general direction discussed with many
* More correction of section 3 layout. directory->opendir, fts->fts_open,deraadt2019-09-021-4/+4
| | | | | getcap->cgetent. pwcache->user_from_uid. And then repair references. ok jmc
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-2/+2
| | | | | | 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.
* Fix previous: create() got inadvertently moved after parse_config(),schwarze2019-05-311-3/+3
| | | | | | which effectively caused the config file to be ignored. So move parse_config() back after create(). OK deraadt@
* unveil code was unaware of -f option.deraadt2019-05-161-13/+14
| | | | | From Anton Borowka. ok sthen
* Add a velocity sensor type (displayed as m/s)landry2018-12-101-3/+7
| | | | | | | Change distance sensor type to be displayed as meters with 3 decimals instead of millimeters. ok mpi@ kettenis@
* unveil support is a bit amusing. /etc/sensorsd.conf with "r", andderaadt2018-10-221-1/+6
| | | | | | | "/" 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
* Adjust references for sysctl(3) to sysctl(2)deraadt2018-01-122-7/+7
|
* Text improvements for precision and clarity, in particular properlyschwarze2017-07-232-24/+44
| | | | | | | | | 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@
* Add command line option -f to specify alternative config file.bluhm2017-03-202-5/+18
| | | | from Matthias Pitzl
* Pull in <sys/time.h> for struct timespec, timeval, or clockrateguenther2016-08-271-1/+2
| | | | ok deraadt@
* Remove NULL-checks before free().mmcc2015-12-121-3/+2
|
* pledge "stdio rpath proc exec"deraadt2015-11-191-1/+4
|
* KNFderaadt2015-11-191-9/+12
|
* use file system path (.Pa) semantic markup macros where appropriate.sobrado2015-07-272-6/+6
| | | | ok jmc@
* get_val() already frees the buffer passed to it so we don't need tomillert2015-06-151-3/+1
| | | | do it in the caller.
* Don't leak value returned by cgetstr(). OK deraadt@millert2015-06-021-3/+7
|
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-2/+3
| | | | | | | | | 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)
* Don't single out ami(4) here; other RAID drivers support logicalmillert2014-08-261-5/+3
| | | | drive reporting too. OK jsing@
* If you want <sys/queue.h>, you need to include it. Don't assume thatderaadt2014-06-291-1/+2
| | | | | <sys/sysctl.h> will pull in the universe (I am working on breaking that assumption in a gentle fashion)
* add more sensor types to sensor framework.yuo2012-09-201-1/+13
| | | | | | | | - Pressure (10^-3 Pa) - distance (10^-6 m) - acceleration (10^-6 m/s^2) ok deraadt@ reyk@
* Remove an OpenBSD-specific tweak regarding .Xr spacingschwarze2011-12-031-3/+3
| | | | | | | | 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@
* add lacked cases of sensors value, and fix orders.yuo2011-09-161-6/+14
|
* apply following changes to sensor framework:yuo2011-09-161-1/+7
| | | | | | | - change accuracy of SENSOR_FREQ from Hz to muHz - add SENSOR_VOLTS_AC entry to userland programs ok deraadt@
* Add the "angle" sensor, measured in degrees; from Luis Pintoderaadt2010-04-211-1/+5
|
* Get rid of MAXSENSORDEVICES. Gaps in sensordev lists are now handledderaadt2010-04-201-5/+7
| | | | | | | 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
* SENSOR_WATTS; ok canacar deraadt kettenis henningcnst2009-08-141-1/+5
|
* When there are no sensors, don't run the hotplugging consistency check,cnst2008-06-141-1/+3
| | | | | the logic of which assumes that there is at least one sdlim. ok henning
* When a hotplugged sensordev appears, load its configuration individually,cnst2008-06-111-13/+9
| | | | | instead of reloading the configuration for all sensordevs. ok henning
* * Remove the exit condition on no sensors at start-up, since we now supportcnst2008-06-111-27/+31
| | | | | | | hotplugging. * Factor out some code from main() into a new create() procedure, to save some memory and make the code tidier. ok henning
* Support hotpluggable sensors (e.g. the post-4.2 ipmi0 created by thecnst2008-06-111-4/+85
| | | | | | deferred thread, as well as some timedelta sensors). ok henning, ckuethe
* Error out with usage line if additional arguments are given after thepyr2008-05-121-1/+6
| | | | | | option parsing. Found out the hard way by jdixon on ifstated. ok sobrado@, jdixon@, millert@
* s/273.16/273.15/g, then refactor the formulae to ensure that thecnst2008-03-161-3/+3
| | | | | | double to int64_t conversions happen sooner rather than later discussed with / ok by kettenis
* text simplification;jmc2008-03-161-2/+2
|
* Reduce the number of unnecessary time(3)/gettimeofday(2) calls, and make surecnst2008-03-162-44/+25
| | | | | | | | | | | 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
* explicitly report whether the lower or upper limit is exceeded; ok sthen@ ckuethe@cnst2008-03-152-13/+24
|
* - punctuate and order the tokens list, to stop it looking scrappyjmc2008-03-141-14/+13
| | | | - it doesn;t make sense to list esm(4) in SEE ALSO
* Add a "%l" token to signal whether a sensor value is in or out of bounds,ckuethe2008-03-142-4/+28
| | | | | without regard for the specific value. It's a big heavy binary hammer... ok & style feedback from cnst
* document the just-committed %s token.ckuethe2008-03-131-1/+3
| | | | ok mbalmer
* Allow a program invoked on state change to receive sensor status. Perhapsckuethe2008-03-132-7/+30
| | | | | | | | | | 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
* log positive events ('OK', 'within') with LOG_INFO instead of LOG_ALERT;cnst2007-12-051-3/+5
| | | | partly spotted by bluhm@ grunk@; ok grunk@
* sort options list;jmc2007-11-281-5/+5
|
* add options to specify the check and report intervals. ok deraadttedu2007-11-282-7/+30
|
* sync printing w/ sysctl(8) and add missing sensor types to conf parser;cnst2007-08-142-7/+27
| | | | | | document how values are parsed in sensorsd.conf(5). ok deraadt@; man-page ok/help jmc@
* Commentary in the examples section was wrong from the start, because it gavecnst2007-08-141-10/+14
| | | | | | | | | 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@
* add caveats section, documenting previously undocumented state dumping mechanism; ok jmc@ henning@cnst2007-08-111-1/+12
|
* s/ and alerter// against previous: 'alerter' is not a standard word (yet),cnst2007-08-111-3/+3
| | | | | even if it is present in certain dictionaries (it is). Also, it doesn't add that much to .Nd anyhow. Requested by jmc@
* sync sensorsd.8: add my copyright; change NAME summary; fix some grammar;cnst2007-08-101-7/+16
| | | | | | | 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@
* sync sensorsd.conf.5 with reality, including:cnst2007-08-101-10/+33
| | | | | | | | | | * 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@