summaryrefslogtreecommitdiff
path: root/usr.sbin/ntpd/sensors.c
AgeCommit message (Collapse)Author
2007-09-12Add a knob to compensate for a refclock that is early or late. Based on aChris Kuethe
diff from Maurice Janssen. Manpage help from jmc and Maurice, other nits from deraadt and otto. ok deraadt, otto
2007-08-04This diff makes ntpd poll for sensors more aggressively when the use ofChris Kuethe
sensors is requested, but no sensors are found. ok henning
2007-01-23Typo in fatal() message found by dunceor @ gmail dot comClaudio Jeker
2007-01-15the new sensors tre can give us the number of sensors per type.Henning Brauer
With this patch, we give up without bothering sysctl kern_sensors.c::sensor_find() unless we know for sure that timedelta sensor is present. From: "Constantine A. Murenin" <cnst+openbsd@bugmail.mojo.ru>
2007-01-15Although Unix compilers accept more than one definition of a globalOtto Moerbeek
symbol, follow the guidelines from K&R: only one definition of a global symbol (and possibly more declarations). Rename some vars here and there to avoid shadowing. ok henning@
2007-01-14Add some comments on the expresssion which converts sensor timedeltasOtto Moerbeek
to ntp offsets; also, rewrite the expression to make it more clear with no change in semantics. ok henning@
2006-12-28forgot a dereference in the previous conversion; ok deraadt@Christian Weisgerber
2006-12-23adapt to new two-level sensor sysctl framework; by Constantine A. MureninTheo de Raadt
2006-11-20with usig the meadian offset froma number of measurements the recordingHenning Brauer
of the last sensor update time got broken, doesn't show up with gps since it updates often (more often than we read), but naddy ran into it with dcf. record time of last sensor datum seperately. ok naddy balmer
2006-10-27use clock_gettime(CLOCK_MONOTONIC, ..) to get a monotonically increasingHenning Brauer
time, and make ntpd use that to send the next uery to an ntp peer and the like. this has the advantage that changes to the clock do not interfere with the intervals. for example, when we start on machines without an RTC and the initial settime (-s) kicks in, intervals were strange. idea from amandal@entrisphere.com, this implementation by me tested ckuethe, phessler, mbalmer, ok mbalmer
2006-10-24timedelta sensors are usually updated very often, but we used to queryHenning Brauer
them only every 30 seconds. now query them every 5,and take the median value from 7 queries as sensor value. this takes outliers out of the equation and makes the overall result much better, especially for sensors with heavy jitter (like nmea for now)
2006-10-12need to call adjtime once in a while here too, otherwise sensor-onlyHenning Brauer
servers never update the system clock
2006-10-12internally, ntpd doesn't work with absolute offsets to system time, butHenning Brauer
takes the offset it adjtime() is already correcting for into account when taking the offset from a sensor, we need to correct it by the offset between system time and ntpd view.
2006-08-19make sure updates from sensors have the "synced" flag setHenning Brauer
2006-06-30spacesTheo de Raadt
2006-06-02just ise "HARD" as refid with sensors for v3 clientsHenning Brauer
2006-06-01urgs, other stuff snuck inHenning Brauer
2006-06-01do not use /dev/hotplug for now, only one reader supported yetHenning Brauer
2006-05-29when we cannot open /dev/hotplug, donn't bail, just work withoutHenning Brauer
with ckuethe
2006-05-28allow for weight to be added to sensors or servers, so that one canHenning Brauer
weight timedelta sensors higher than ntp peers, for example ok deraadt mbalmer
2006-05-28get clock src id from the timedelta sensor desc.Henning Brauer
unfortunately I still don't have any hardware to test this ;(
2006-05-28if sysctl gives ENOENT the sensor is gone and we remove itHenning Brauer
2006-05-28let sensor_query handle removals itselfHenning Brauer
2006-05-28sensor_byid not needed any moreHenning Brauer
2006-05-28hotplug devid will go away in a minute, so don't use it here any longerHenning Brauer
2006-05-28do not bother with rmeoval events, we remove sensors whoch vanished orHenning Brauer
are not a timedelta sensor any more on query on the fly anyway
2006-05-28DV_SENSORS is no more, plug workaround for the time to the real solutionHenning Brauer
2006-05-28make use of the new hotplug events for sensors showing up or vanishingHenning Brauer
2006-05-27add sensor_byid(), return sensor by its idHenning Brauer
2006-05-27stop passing the config around all time, just store one copyHenning Brauer
2006-05-27factor out sensor_probe from sensor_scan so we can probe a sensors whenHenning Brauer
we know its idea without scanning all again
2006-05-27make ntpd listen on the hotplug socket and decode yadda yadda, becauseHenning Brauer
new sensors showing up will be announced that way when slacking ml comes back from food
2006-05-27config file bits for timedelta sensors, so one can specify which devicesHenning Brauer
to use. "sensors *" just uses all. untested due to lack of hardware. hacked on the road somewhere between vancouver and calgary
2006-05-26add support for timedelta sensors, which pretty much means udcf(4) rightHenning Brauer
now. untested due to lack of hardware, and it wouldn't have worked in the plane anyways. work in progress, currently picks up and uses all sensors it finds, config file bits to be added soon. theo fine with this going in