View previous topic :: View next topic |
Author |
Message |
b4nsh33 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 29 Oct 2004 Posts: 85
|
Posted: Wed May 18, 2005 10:50 pm Post subject: opentpd |
|
|
Hi, i want to keep my clock in sync with my routers cisco, im using opentpd for simplicity.
this is my config
/etc/opentpd.conf
# $OpenBSD: ntpd.conf,v 1.7 2004/07/20 17:38:35 henning Exp $
# sample ntpd configuration file, see ntpd.conf(5)
# Addresses to listen on (ntpd does not listen by default)
listen on *
#listen on 127.0.0.1
#listen on ::1
# sync to a single server
#server ntp.example.org
server 200.13.161.150
# use a random selection of 8 public stratum 2 servers
# see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers
#servers pool.ntp.org
200.13.161.150 is my ntp server (cisco 7200), i dont see any errors or messages on syslog, the clock is not in sync with the router, what should i check? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
nephros Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/145383245043ee5edfbdaa3.png)
Joined: 07 Feb 2003 Posts: 2139 Location: Graz, Austria (Europe - no kangaroos.)
|
Posted: Thu May 19, 2005 1:11 pm Post subject: |
|
|
Check with ps that ntpd is actually running, and also that your clock is roughly in sync with the router at the time you start it (for example by running ntpdate just before starting it).
Some ntp daemons will silently exit if the clocks differ too much. _________________ Please put [SOLVED] in your topic if you are a moron. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
darkphader Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_fry.gif)
Joined: 09 May 2002 Posts: 1225 Location: Motown
|
Posted: Wed May 25, 2005 11:13 pm Post subject: |
|
|
Isn't "listen on" only needed if you want it to be a time server and not just a client?
Also if you add "-s" as a startup option openntpd will automatically adjust the clock if it's more than 180 seconds off. No need to manually get close. _________________ WYSIWYG - What You See Is What You Grep |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
makenoob Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 19 Aug 2004 Posts: 272 Location: /Germany/Düsseldorf
|
Posted: Tue Aug 09, 2005 2:42 pm Post subject: |
|
|
darkphader wrote: | Isn't "listen on" only needed if you want it to be a time server and not just a client?
Also if you add "-s" as a startup option openntpd will automatically adjust the clock if it's more than 180 seconds off. No need to manually get close. |
when i add the -s option openntpd logs:
/var/log/messages wrote: |
ntpd: adjtime failed: Invalid argument
|
when i start ntpd through the init-skript, it seems that openntpd tries to use "settimeofday", which is the invalid argument:
/bin/bash wrote: |
* Starting ntpd ...
settimeofday: Invalid argument
set local clock to Tue Aug 9 16:35:54 CEST 2005 (offset -3556.891896s) [ ok] |
ntpd gets the right time but cannot change the local time. is this set in the sources or can i change this elsewhere? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
makenoob Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 19 Aug 2004 Posts: 272 Location: /Germany/Düsseldorf
|
Posted: Tue Aug 09, 2005 2:53 pm Post subject: |
|
|
i made a mistake in /etc/conf.d/ntpd. is has to be "NTPD_OPTS=" -s"" with a space
darkphader wrote: | Isn't "listen on" only needed if you want it to be a time server and not just a client? |
Yes, it is. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|