LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 09-28-2007, 07:55 PM   #16
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,050

Rep: Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971

NTP has been around a *looong* time. Handling propagation delay was one of the design criteria. 28k dial-up will be fine.
 
Old 09-28-2007, 09:42 PM   #17
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Original Poster
Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
Configuring ntpd on Slackware

Yes, I read that it (NTP) is one of the oldest protocols still in use, and apparently maintained by its 'inventor' still.

Anyhow, since my last post, I decided to go ahead and configure my ntp daemon. Luckily for me, others have taken this path before me, as the man pages are about the most vague I have seen to date, and most info on the net is based on them.
A search of LQ brought me To This Thread which is where I got much of the stuff with which I filled in the blanks in my ntp.conf file.
As of this moment, I think I am astep with the OP of that thread, if not ahead; when I finally got ntpd running correctly, it eventually told me that 11160 seconds was too big a jump, and to set the time manually. Well, 11160s is about 3 hours, which is precisely the amount that any one of my clocks is out-of-whack at any given time. So, I went to the BIOS and set the system clock to the CORRECT time UTC, and rebooted. I imagine the daemon is now running, but I have been posting this thread and haven't checked the log yet.
However, I would like to post the file.conf and log output, so that someone who knows what they're talking about can maybe tell me two or three things:
#1 - Is this output indicative of a properly functioning ntpd?
and
#2 - in the interest of not abusing the NTP server network, can anyone tell me what units of time are being used in the broadcastdelay setting in ntp.conf, and does this setting do what I think it does? The initial value in my file was 0.0008 but I have changed it to 10.0 . So, what does it mean, and what are the units? Further, how DO I tell it how often to check/sync the clock?

Here's my file right now, with most comments removed:
Code:
# Configuration file for ntpd.
#
logfile /var/log/ntp.log
logconfig all

# Canada pool servers
server 0.ca.pool.ntp.org
server 1.ca.pool.ntp.org
server 2.ca.pool.ntp.org
server 3.ca.pool.ntp.org	
# server 127.127.1.0	# local clock
#
driftfile /etc/ntp/drift

# what does this stuff do?
statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

# and what's this doing??
multicastclient	# listen on default 224.0.1.1

# these don't work:
# listen eth0
# listen on lo

# what's this doing?
broadcastdelay	10.0

# I don't need keys do I?
#keys		/etc/ntp/ntp.keys
#trustedkey	62889
#requestkey	12888
#controlkey	61421

# All the default 'restrict' stuff just caused everything to not work..
So, let's go look at the log, shall we?
Hmmm..
Code:
29 Sep 01:42:18 ntpd[2369]: logging to file /var/log/ntp.log
29 Sep 01:42:18 ntpd[2369]: precision = 1.000 usec
29 Sep 01:42:18 ntpd[2369]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
29 Sep 01:42:18 ntpd[2369]: Listening on interface wildcard, 0.0.0.0#123 Disabled
29 Sep 01:42:18 ntpd[2369]: Listening on interface lo, 127.0.0.1#123 Enabled
29 Sep 01:42:18 ntpd[2369]: Listening on interface eth0, 192.168.0.2#123 Enabled
29 Sep 01:42:18 ntpd[2369]: kernel time sync status 0040
29 Sep 01:42:18 ntpd[2369]: frequency initialized 0.000 PPM from /etc/ntp/drift
29 Sep 01:42:19 ntpd[2369]: frequency initialized 0.000 PPM from /etc/ntp/drift
29 Sep 01:42:19 ntpd[2369]: system event 'event_restart' (0x01) status 'sync_alarm, sync_unspec, 1 event, event_unspec' (0xc010)
29 Sep 01:42:20 ntpd[2369]: peer 216.138.202.177 event 'event_reach' (0x84) status 'unreach, conf, 1 event, event_reach' (0x8014)
29 Sep 01:42:21 ntpd[2369]: peer 192.139.46.42 event 'event_reach' (0x84) status 'unreach, conf, 1 event, event_reach' (0x8014)
29 Sep 01:42:22 ntpd[2369]: peer 192.135.48.21 event 'event_reach' (0x84) status 'unreach, conf, 1 event, event_reach' (0x8014)
29 Sep 01:42:23 ntpd[2369]: peer 192.75.104.241 event 'event_reach' (0x84) status 'unreach, conf, 1 event, event_reach' (0x8014)
29 Sep 01:46:42 ntpd[2369]: system event 'event_peer/strat_chg' (0x04) status 'sync_alarm, sync_ntp, 2 events, event_restart' (0xc621)
29 Sep 01:46:42 ntpd[2369]: synchronized to 192.139.46.42, stratum 2
29 Sep 01:47:56 ntpd[2369]: time reset +74.694801 s
29 Sep 01:47:56 ntpd[2369]: kernel time sync enabled 0001
29 Sep 01:47:56 ntpd[2369]: system event 'event_clock_reset' (0x05) status 'sync_alarm, sync_unspec, 3 events, event_peer/strat_chg' (0xc034)
29 Sep 01:48:09 ntpd[2369]: peer 192.75.104.241 event 'event_reach' (0x84) status 'unreach, conf, 2 events, event_reach' (0x8024)
29 Sep 01:48:12 ntpd[2369]: peer 192.135.48.21 event 'event_reach' (0x84) status 'unreach, conf, 2 events, event_reach' (0x8024)
29 Sep 01:48:45 ntpd[2369]: peer 216.138.202.177 event 'event_reach' (0x84) status 'unreach, conf, 2 events, event_reach' (0x8024)
29 Sep 01:48:49 ntpd[2369]: peer 192.139.46.42 event 'event_reach' (0x84) status 'unreach, conf, 2 events, event_reach' (0x8024)
29 Sep 01:52:29 ntpd[2369]: system event 'event_peer/strat_chg' (0x04) status 'sync_alarm, sync_ntp, 4 events, event_clock_reset' (0xc645)
29 Sep 01:52:29 ntpd[2369]: synchronized to 192.135.48.21, stratum 2
29 Sep 01:52:29 ntpd[2369]: system event 'event_sync_chg' (0x03) status 'leap_none, sync_ntp, 5 events, event_peer/strat_chg' (0x654)
29 Sep 01:52:29 ntpd[2369]: system event 'event_peer/strat_chg' (0x04) status 'leap_none, sync_ntp, 6 events, event_sync_chg' (0x663)
29 Sep 01:58:23 ntpd[2369]: synchronized to 192.139.46.42, stratum 2
29 Sep 02:15:39 ntpd[2369]: time reset +0.268735 s
29 Sep 02:15:39 ntpd[2369]: system event 'event_clock_reset' (0x05) status 'sync_alarm, sync_unspec, 8 events, event_peer/strat_chg' (0xc084)
29 Sep 02:15:39 ntpd[2369]: system event 'event_peer/strat_chg' (0x04) status 'sync_alarm, sync_unspec, 9 events, event_clock_reset' (0xc095)
29 Sep 02:16:15 ntpd[2369]: peer 216.138.202.177 event 'event_reach' (0x84) status 'unreach, conf, 3 events, event_reach' (0x8034)
29 Sep 02:16:19 ntpd[2369]: peer 192.139.46.42 event 'event_reach' (0x84) status 'unreach, conf, 3 events, event_reach' (0x8034)
29 Sep 02:16:36 ntpd[2369]: peer 192.75.104.241 event 'event_reach' (0x84) status 'unreach, conf, 3 events, event_reach' (0x8034)
29 Sep 02:16:42 ntpd[2369]: peer 192.135.48.21 event 'event_reach' (0x84) status 'unreach, conf, 3 events, event_reach' (0x8034)
29 Sep 02:20:34 ntpd[2369]: synchronized to 192.139.46.42, stratum 2
29 Sep 02:20:34 ntpd[2369]: system event 'event_sync_chg' (0x03) status 'leap_none, sync_ntp, 11 events, event_peer/strat_chg' (0x6b4)
29 Sep 02:20:34 ntpd[2369]: system event 'event_peer/strat_chg' (0x04) status 'leap_none, sync_ntp, 12 events, event_sync_chg' (0x6c3)
So, even I can tell that the time got synchronized.. But are those rather cryptic status messages normal, and OK??
And I can see that it synchronized a second time, to a different server, and checking the log again before posting this, I see it is syncing at weird intervals. It's working, but is it working right?

Well hey, my desktop clock is correct, despite that rotten 'Halifax' under it-- I'll locate that config file sometime, Raskin-- and I'll hafta wait till tomorrow to see when the crons run, but I suspect they'll be ontime. Meanwhile, feedback welcome!

PS - 'scuse my typing, my pet snake's sleeping in/on my left hand
 
Old 09-28-2007, 10:09 PM   #18
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Original Poster
Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
Code:
29 Sep 02:38:07 ntpd[2369]: system event 'event_peer/strat_chg' (0x04) status 'leap_none, sync_ntp, 15 events, event_sync_chg' (0x6f3)
29 Sep 02:42:48 ntpd[2369]: synchronized to 192.139.46.42, stratum 2
29 Sep 02:43:34 ntpd[2369]: offset 0.029711 sec freq 5.794 ppm error 0.088526 poll 6
29 Sep 03:06:14 ntpd[2369]: time reset +0.301464 s
29 Sep 03:06:14 ntpd[2369]: system event 'event_clock_reset' (0x05) status 'sync_alarm, sync_unspec, 15 events, event_peer/strat_chg' (0xc0f4)
29 Sep 03:06:14 ntpd[2369]: system event 'event_peer/strat_chg' (0x04) status 'sync_alarm, sync_unspec, 15 events, event_clock_reset' (0xc0f5)
29 Sep 03:06:44 ntpd[2369]: peer 216.138.202.177 event 'event_reach' (0x84) status 'unreach, conf, 5 events, event_reach' (0x8054)
29 Sep 03:06:56 ntpd[2369]: peer 192.135.48.21 event 'event_reach' (0x84) status 'unreach, conf, 5 events, event_reach' (0x8054)
29 Sep 03:07:04 ntpd[2369]: peer 192.75.104.241 event 'event_reach' (0x84) status 'unreach, conf, 5 events, event_reach' (0x8054)
29 Sep 03:07:13 ntpd[2369]: peer 192.139.46.42 event 'event_reach' (0x84) status 'unreach, conf, 5 events, event_reach' (0x8054)

more log output.. What's this 'ppm error' ?
 
Old 09-28-2007, 10:21 PM   #19
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
Well, from documentation follows that you do not need broadcast delay - you use unicast NTP to server anyway. It is needed when one server sends data to multiple clients, and for some reason doesn't want to exchange with them one-by-one. For frequency add 'minpoll <k> maxpoll <l>' after each server; ntpd will poll this server no more frequent than 2^k seconds, but not less frequent than 2^l seconds. It should sync at weird intervals - they are random to reduce chances of worst-case scenarios for servers. I would check status messages with Wireshark - maybe unreach means packet loss, for example, sniffer will show everything. And what desktop environment are you using? I know that KDE doesn't display TZ. Neither does IceWM.
PPM error is probably 'pulses per minute' - frequency error that can be calculated from multiple time updates.
 
Old 09-28-2007, 10:27 PM   #20
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Original Poster
Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
Wow, good stuff! Thanks Raskin

For the reocrd, I am using KDE, and it does display my timezone, but I shrunk the font so small that it now poses no problem.. I'd like to use a lesser WM, but to date I haven't gotten around to allocating the time it might take to get a lighter WM set up so I'd be happy with it.

I'll have to look into Wireshark-- I have no experience with it, and don't even know what it is.

The PPM info you suggest sounds good enough to be correct, so that works for me.

I will add the minpoll and maxpoll, and hope it accepts them. Where did you get those arguments from?

Thanks again!
 
Old 09-28-2007, 10:34 PM   #21
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
I went to www.ntp.org and read documentation there. That's probably the only place where you can be sure to get all options... Wireshark is just a program to show you all the network traffic on your computer. By the way, do you use plain or digital clock in KDE? I checked digital with no additional information checked in 'configure clock'->appearance.
 
Old 09-28-2007, 10:49 PM   #22
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Original Poster
Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
I am using digital clock, with 'frame' and 'flashing dots'. I used analog clock until recently, and it was the same. I still have 'Halifax' under it, but no big deal.

I didn't realize, and didn't see, that ntp.org would have the ntpd configuration options. I'll read them.
Since I'm here, I did this in my config file:
Code:
# Canada pool servers:
#
server 0.ca.pool.ntp.org minpoll 14 maxpoll 12
server 1.ca.pool.ntp.org minpoll 14 maxpoll 12
server 2.ca.pool.ntp.org minpoll 14 maxpoll 12
server 3.ca.pool.ntp.org minpoll 14 maxpoll 12
and this is the output to the log:
Code:
: offset 0.069469 sec freq 9.926 ppm error 0.033880 poll 6
29 Sep 03:43:33 ntpd[26788]: config error: minpoll > maxpoll
29 Sep 03:43:34 ntpd[26788]: config error: minpoll > maxpoll
29 Sep 03:43:34 ntpd[26788]: config error: minpoll > maxpoll
29 Sep 03:43:34 ntpd[26788]: config error: minpoll > maxpoll
29 Sep 03:43:34 ntpd[26788]: frequency initialized 9.926 PPM from /etc/ntp/drift
29 Sep 03:43:34 ntpd[26788]: system event 'event_restart' (0x01) status 'sync_alarm, sync_unspec, 1 event, event_unspec' (0xc010)
I'll look at ntp.org (with its microscopic fonts, sheesh..) and see what's up with this..

 
Old 09-28-2007, 11:15 PM   #23
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Original Poster
Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
Config options for NTPD

NTP Daemon Config Options by Univ. of Alberta

Found the above, which details all the options.
 
Old 09-29-2007, 02:46 AM   #24
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
Well, minpoll is greater than maxpoll, it can be expected to fail.

PS. 'Ctrl-+' allows you not to think about font size
PPS. Editing ~/.kde/share/config/clock*rc and setting Initial_TZ=0 (and RemoteZones= ) can help.
 
Old 09-29-2007, 07:42 AM   #25
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Original Poster
Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
minpoll & maxpoll

Quote:
Originally Posted by raskin View Post
Well, minpoll is greater than maxpoll, it can be expected to fail.
I initially took minpoll to mean 'minimum polling frequency' which would indeed be a larger number, and the opposite for maxpoll: a smaller number would mean 'more frequent polls'.

Seemed logical, in the absence of specific details, but.. It was the other way 'round. All fixed up now and thanks again *again* for the config editing tips -- I'll check into that too!
EDIT -changing the clock*rc didn't work. Soon as I save it, the next time I open it it's back the way it was. Anyway, as I mentioned, the font is so small that it doesn't bother me any more.

Саша

Last edited by GrapefruiTgirl; 09-29-2007 at 07:51 AM.
 
Old 09-29-2007, 10:47 AM   #26
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
I told that the measurement unit is second, as it is stated on ntp.org..
And clock*rc should be edited without KDE running.
 
Old 09-29-2007, 11:03 AM   #27
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Original Poster
Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
Quote:
Originally Posted by raskin View Post
I told that the measurement unit is second, as it is stated on ntp.org..
I'm not claiming otherwise, nor am I trying to be argumentative; yes, you did say it was 2^minpoll and 2^maxpoll SECONDS. The detail I was missing was which was which was the lesser of the two. I interpreted your first instruction such that I had them transposed. No big deal.

Thanks again
 
  


Reply

Tags
clock, ntp, ntpd, resolved, slackware, sync, synchronize, time


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System clock correct, hardware clock wrong karlovac Linux - General 5 01-16-2009 07:19 PM
KDE clock is wrong and right... WARnux Linux - Software 25 12-08-2008 06:35 PM
Printing from Debian machine to Win machine, What I did wrong. sarajevo Debian 8 04-30-2008 11:08 PM
Various clock issues: Clock shows wrong time only in Knoppmyth, & CMOS time change ? davidbix General 1 04-05-2006 09:58 PM
Clock on wrong time bripage Linux - General 4 08-08-2002 08:45 PM


All times are GMT -5. The time now is 07:38 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration