[chrony-dev] refclock prefer and log

2009-11-28 Thread Håkan Johansson
Hi, I'm testing chrony (current git) with two GPS reference clocks, but am suffering from chrony moving between the two equally good sources as reference clock. It would be nice with an option akin to the ntpd 'prefer' to force one of the two (when it is an eligible source, i.e. OK for sync

Re: [chrony-dev] refclock prefer and log

2009-11-28 Thread Håkan Johansson
I'm testing chrony (current git) with two GPS reference clocks, but am suffering from chrony moving between the two equally good sources as reference clock. In what sense suffering? Those two clocks should be equivalent to better than a microsecond if you are using pps. If not, then it might wel

[chrony-dev] chronyc linear fit data point dump

2009-12-11 Thread Håkan Johansson
Hi, I could not find a command in chronyc to dump all the currently active data points used in the linear fit for a source. This list together with the residuals would be nice to see what chronyd is up to. For monitoring, I'm using (and quite happy with): watch -n 1 "./chronyc sources ; .

Re: [chrony-dev] chronyc linear fit data point dump

2009-12-11 Thread Håkan Johansson
On Fri, 11 Dec 2009, Bill Unruh wrote: On Fri, 11 Dec 2009, Håkan Johansson wrote: Hi, I could not find a command in chronyc to dump all the currently active data points used in the linear fit for a source. This list together with the residuals would be nice to see what chronyd is up to

[chrony-dev] NTPv4 ?

2009-12-24 Thread Håkan Johansson
It seems newer versions of ntpd sends client requests with version set to 4, that therefore are ignored by chronyd only accepting 3. At least the basic packet format looks the same, so one could accept those and send responses? Cheers, Håkan

[chrony-dev] shm permissions

2010-01-25 Thread Håkan Johansson
Hi, ntpd creates the shm refclock segments 2 and 3 with permissions 0666 (previously 0777), allowing also non-root users to provide synchronisation data when these segments are set up. The attached patch changes chrony to do that to (currently 0700 for all segments). It also changes the pe

Re: [chrony-dev] shm permissions

2010-01-25 Thread Håkan Johansson
provide reference data. This is useful for the further testing of gpsd I am doing, and the need to modify/restart gpsd doing that. Cheers, Håkan On Mon, 25 Jan 2010, Håkan Johansson wrote: Hi, ntpd creates the shm refclock segments 2 and 3 with permissions 0666 (previously 0777

Re: [chrony-dev] shm permissions

2010-01-26 Thread Håkan Johansson
Ok, could it perhaps be made an explicit option of the refclock? (The sysadmins were happy to not have to change more than the config file for the few machines in question. :) ) Cheers, Håkan On Tue, 26 Jan 2010, Miroslav Lichvar wrote: On Mon, Jan 25, 2010 at 09:48:57PM +0100, Håkan

Re: [chrony-dev] shm permissions

2010-01-29 Thread Håkan Johansson
In the latest git the permissions can now be specified with :perm=666. Great! Perhaps and the output of strtol(s, NULL, 8) with 0666 to prevent the user from setting any other flags by mistake. Cheers, Håkan

[chrony-dev] long time to re-sync with bad system clock

2010-01-31 Thread Håkan Johansson
Hi, I have a system with a rather bad internal clock, unstable with respect to temperature or voltage. Without load the frequency is about 80 ppm slow, with 100 % system load it is 10 ppm slow. Anyhow, there is one GPS connected, and quite a few network time sources. When load is stable, t

Re: [chrony-dev] long time to re-sync with bad system clock

2010-02-02 Thread Håkan Johansson
On Tue, 2 Feb 2010, Miroslav Lichvar wrote: On Sun, Jan 31, 2010 at 11:51:02PM +0100, Håkan Johansson wrote: To avoid having to do that, I'd like to propose something like: If a new system (B) is to be elected reference source, taking over from an old (A), then B must have made its

[chrony-dev] SHM naming

2010-02-01 Thread Håkan Johansson
It seems the SHM refclocks are named (indexed) by their appearance in the config file and not by the ntpshm block they correspond to. Having e.g. refclock SHM 3:perm=666 filter 63 refclock SHM 2:perm=666 filter 63 refclock SHM 1 filter 63 offset 0.0 delay 1e-4 I still get a list like: SHM0

Re: [chrony-dev] SHM naming

2010-02-01 Thread Håkan Johansson
On Mon, Feb 01, 2010 at 07:42:34AM +0100, Håkan Johansson wrote: It seems the SHM refclocks are named (indexed) by their appearance in the config file and not by the ntpshm block they correspond to. Having e.g. refclock SHM 3:perm=666 filter 63 refclock SHM 2:perm=666 filter 63 refclock SHM 1

Re: [chrony-dev] PPSAPI: kernel consumer

2010-02-08 Thread Håkan Johansson
I've tested chrony's PPS driver and I'm really shocked with its synchronization quality. It is a HUGE improvement over ntpd. It was hard to believe that it can sync clock with a precision of 1-2us but it is true. However, my new kernel consumer seems to be able to keep the same precision, but it c

Re: [chrony-dev] PPSAPI: kernel consumer

2010-02-08 Thread Håkan Johansson
On Mon, 8 Feb 2010, Miroslav Lichvar wrote: On Mon, Feb 08, 2010 at 12:35:59PM +0100, Håkan Johansson wrote: I've recently (for slightly other reasons) measured the in-kernel time consumed by doing getnstimeofday() (several in a row), and for most machines (2 GHz+) it took a whopping ~ 5

[chrony-dev] Avoid large times in chronyc sources / sourcestats overflowing

2010-03-28 Thread Håkan Johansson
The attached patch changes the formatting of (nano)seconds such that very large time offsets does not cause the lines of 'sources' or 'sourcestats' to overflow. Root cause was the conversion from double to int that gave misleading values, fooing the following logics. %f formatting in printf

Re: [chrony-dev] Let the kernel write the sys clock to RTC

2010-05-14 Thread Håkan Johansson
Hi, if I understand the discussion so far, there are two seemingly mutually exclusive uses of the RTC: a) Determining its actual rate, such that it can be used to set the system time even after a long system shutdown. This requires (rather accurate) knowledge of its drift. b) Keeping

[chrony-dev] Sending time over serial cable and firewire

2011-01-08 Thread Håkan Johansson
Two programs, serial_ntpshm and ieee1394_ntpshm, to send and receive time stamps over a serial null-modem line or firewire bus are available at http://fy.chalmers.se/~f96hajo/serial_ntpshm/serial_ntpshm_20110108.tar.gz The serial transmission is with RTS/CTS and DTR/DTS, with the time of the

Re: [chrony-dev] Slow bootup with git

2012-04-25 Thread Håkan Johansson
On Wed, 25 Apr 2012, Bill Unruh wrote: On Wed, 25 Apr 2012, Ed W wrote: On 24/04/2012 11:17, Miroslav Lichvar wrote: On Tue, Apr 17, 2012 at 09:07:08AM -0700, Bill Unruh wrote: > Mind you the rtc should not take 8 sec to read (it will take a couple, > so > perhaps most of that time is

Re: [chrony-dev] chrony as reference?

2012-06-09 Thread Håkan Johansson
On Sat, 9 Jun 2012, Bill Unruh wrote: Is there some way of telling chrony to use certain sources not as candidates for the selected sever but rather simply as references? Ie, chony queries ths sources as usual, and goes through all the calculations, but then does not use it as a selected sour

Re: [chrony-dev] Traffic amplification with chrony commands

2014-01-16 Thread Håkan Johansson
Hi, I would suggest what I think is called a nonce value. - Server picks some random number/string and keeps that. - Client sends a response, without nonce. - Server takes the apparent client IP and the string and makes some hash of that, the nonce value for that client IP. - Server sends ver

Re: [chrony-dev] Traffic amplification with chrony commands

2014-01-17 Thread Håkan Johansson
On Fri, 17 Jan 2014, Bill Unruh wrote: On Fri, 17 Jan 2014, Miroslav Lichvar wrote: On Thu, Jan 16, 2014 at 07:50:33PM +0100, H???kan Johansson wrote: I would suggest what I think is called a nonce value. I think that's what ntpd uses with the new mrulist command. The advantage over the s

Re: [chrony-dev] Traffic amplification with chrony commands

2014-01-17 Thread Håkan Johansson
On Fri, 17 Jan 2014, Miroslav Lichvar wrote: On Fri, Jan 17, 2014 at 06:15:16PM +0100, Håkan Johansson wrote: With the information collection problem for an attacker above, it is probably so that also a much cheaper pseudo-random number generator could be used instead of MD5. Say that one

Re: [chrony-dev] GCC issue

2014-01-21 Thread Håkan Johansson
With a logical or, the fclose will not happen if fprintf fails. Perhaps better separate these calls? // Håkan On Tue, 21 Jan 2014, Harald Krammer wrote: Hello, I am testing Chrony 1.29 on my ARM based System with GCC 3.4.6. A small problem is happen in reference.c. GCC 3.4.6 does not resp

Re: [chrony-dev] GCC issue

2014-01-21 Thread Håkan Johansson
t_file); LOG(LOGS_WARN, LOGF_Reference, "Could not write to temporary driftfile %s.tmp", drift_file); return; } + fclose(out); + /* Clone the file attributes from the existing file if there is one. */ if (!stat(drift_file,&buf)) { On Tue, 21 Jan 2014 10:39:4

Re: [chrony-dev] Alleged out of bounds read in cmdmon.c

2014-08-05 Thread Håkan Johansson
any allocation in chrony-1.30.tar.gz. Could you verify that you have seen the errors with that clean source, and also send the valgrind output? Thanks, Håkan Johansson On Tue, 5 Aug 2014, Miroslav Lichvar wrote: On Wed, Jul 30, 2014 at 10:53:42AM +0200, Miroslav Lichvar wrote: On Wed, Jul

Re: [chrony-dev] [PATCH] Fix precision loss warnings

2015-08-09 Thread Håkan Johansson
Curiosity: recvfrom and sendto returns ssize_t (which is 64 bits on some platforms), so this would invite for code that could make mistakes, by cutting the values. Should the return value not rather be put in a ssize_t or some other variable that is large enough? And if really casted down,

Re: [chrony-dev] [PATCH] Fix precision loss warnings

2015-08-10 Thread Håkan Johansson
On Sun, 9 Aug 2015, Bryan Christianson wrote: On 9/08/2015, at 5:57 pm, Håkan Johansson wrote: Curiosity: recvfrom and sendto returns ssize_t (which is 64 bits on some platforms), so this would invite for code that could make mistakes, by cutting the values. Should the return value not

Re: [chrony-dev] Documentation patch

2016-10-22 Thread Håkan Johansson
On Sat, 22 Oct 2016, Rune Magnussen wrote: På Fri, 21 Oct 2016 16:11:16 -0700 (PDT) Bill Unruh skrev: On Sat, 22 Oct 2016, Rune Magnussen wrote: Hi When trying to install chrony from source, I found out that the README refered to INSTALL which does not exist. Also asciidoctor is needed dur

Re: [chrony-dev] [PATCH] contrib: remove obsolete scripts

2019-08-15 Thread Håkan Johansson
Perhaps it could be explained why they are obsolote, each contributed item? Best regards, Håkan On Thu, 15 Aug 2019, Vincent Blut wrote: Hello, I hope that this proposal will not cause controversy, but I really think that apart from Bryan’s work, all the provided scripts should be erased d