LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   NTP sync time issue... (https://www.linuxquestions.org/questions/linux-server-73/ntp-sync-time-issue-733545/)

smartyshan 06-17-2009 03:17 AM

NTP sync time issue...
 
Dear All,
I configured NTP client by simply changing /etc/ntp.conf file and add my NTP server in it.

I is synchronizing at every second which generates too much extra traffic what i want is it must sync after an hour periodically.


Need help...

acid_kewpie 06-17-2009 04:53 AM

ntp only synchronizes at most every 16 seconds, so it can't be doing it every second, and a sane and stable instance will only sync every 1024 seconds by default but possibly only every 36.4 hours. show us your ntp.conf and also the output of "ntpq -pn"

smartyshan 06-21-2009 03:38 AM

Quote:

Originally Posted by acid_kewpie (Post 3576896)
ntp only synchronizes at most every 16 seconds, so it can't be doing it every second, and a sane and stable instance will only sync every 1024 seconds by default but possibly only every 36.4 hours. show us your ntp.conf and also the output of "ntpq -pn"


Dear I found it @ evry second may be I am worng
now following is my ntp.conf file

Code:

# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery

# Permit all access over the loopback interface.  This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1
restrict -6 ::1

# Hosts on local network are less restricted.
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 172.26.5.2
server 0.rhel.pool.ntp.org
server 1.rhel.pool.ntp.org
server 2.rhel.pool.ntp.org

#broadcast 192.168.1.255 key 42        # broadcast server
#broadcastclient                        # broadcast client
#broadcast 224.0.1.1 key 42            # multicast server
#multicastclient 224.0.1.1              # multicast client
#manycastserver 239.255.254.254        # manycast server
#manycastclient 239.255.254.254 key 42  # manycast client

# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available.
server  127.127.1.0    # local clock
fudge  127.127.1.0 stratum 10

# Drift file.  Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
driftfile /var/lib/ntp/drift

# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography.
keys /etc/ntp/keys

# Specify the key identifiers which are trusted.
#trustedkey 4 8 42

# Specify the key identifier to use with the ntpdc utility.
#requestkey 8

and the output of #ntpq -pn

Code:

[root@productiondbs ~]# ntpq -pn
    remote          refid      st t when poll reach  delay  offset  jitter
==============================================================================
*172.26.5.2      212.81.107.5    5 u  720 1024  377    1.038  13.506  0.314
 202.134.1.10    .STEP.          16 u    - 1024    0    0.000    0.000  0.000
 130.60.75.53    .STEP.          16 u    - 1024    0    0.000    0.000  0.000
 130.236.254.102 .STEP.          16 u    - 1024    0    0.000    0.000  0.000
 127.127.1.0    .LOCL.          10 l  48  64  377    0.000    0.000  0.001


acid_kewpie 06-22-2009 03:43 AM

well there you are... syncing every 1024 seconds, to 172.26.5.2. looks fine other than only haveing one accessible server there.

smartyshan 06-23-2009 02:04 AM

Quote:

Originally Posted by acid_kewpie (Post 3582036)
well there you are... syncing every 1024 seconds, to 172.26.5.2. looks fine other than only haveing one accessible server there.

Dear Acid thnx alot,

Can u plz eleborate the output of ntpq -pn command.. what is what...

acid_kewpie 06-23-2009 02:37 AM

* = synced to this server
172.26.5.2 = the server you're synced to
212.81.107.5 = the server that server is synced to
5 = the strata of the server your synced to
u = not sure actually
720 = how long until your next poll
1024 = how often you poll
377 = the "reachability" mask of the server - see manpage
1.038 = the time it's taking to get a response from the server
13.506 = how far off their time you are
0.314 = how confident you are in the time their giving you (roughly)


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