Sponsored Content
Top Forums UNIX for Beginners Questions & Answers NTP synchronised problem in our Centos 7.6 node Post 303039051 by shanmugaraj on Saturday 21st of September 2019 05:18:05 AM
Old 09-21-2019
NTP synchronised problem in our Centos 7.6 node

Someone, please help on this issue:-

Code:
Note : for security reason i didn't mention hostnames and ips.
==============================================================================

[root@ ~]# ntpstat
unsynchronised
   polling server every 1024 s
Ntpstat showing unsynchronised.

==============================================================================

[root@~]# systemctl status ntpd
- ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2019-04-04 15:00:51 UTC; 5 months 17 days ago
 Main PID: 8275 (ntpd)
    Tasks: 1
   Memory: 20.0K
==============================================================================

And all poller ntp servers are reaching through ntp port and no packet loss. 


[root@ ~]# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
   node1               2 u   64 1024    7    1.362   -4.212   3.041
    node2             2 u   65 1024    7    1.752   -4.089   3.023
   node3              2 u   64 1024    7   25.469   -4.160   2.876
    node4            2 u   63 1024    7   25.666   -4.238   2.930
    node5            2 u   66 1024    7   45.907   -5.017   3.054
  node6              2 u   65 1024    7   45.905   -4.499   3.045

==============================================================================
NTptime is giving return code 5;
[root@~]# ntptime
ntp_gettime() returns code 5 (ERROR)
  time e1305f50.e00d7fc8  Sat, Sep 21 2019  8:35:28.875, (.875206994),
  maximum error 16000000 us, estimated error 16000000 us, TAI offset 0
ntp_adjtime() returns code 5 (ERROR)
  modes 0x0 (),
  offset 0.000 us, frequency 43.490 ppm, interval 1 s,
  maximum error 16000000 us, estimated error 16000000 us,
  status 0x2041 (PLL,UNSYNC,NANO),
  time constant 10, precision 0.001 us, tolerance 500 ppm,
[root@~]# date
Sat Sep 21 08:35:33 UTC 2019

==============================================================================

This is the alert we're getting every time but usually, it's getting a fix within 10mins 

OP5 alert is :- 
'Check NTP Status' on host 'hostname' has passed the WARNING threshold.

Service: Check NTP Status
Service Notes: 

Status : WARNING
Notification Comment: 

Additional info:  
Warning - NTPd Health is 50% with 6 peer(s).

Thresholds:  Health (20%


Kindly help on this to fix the issue.

Last edited by Neo; 09-22-2019 at 06:14 AM.. Reason: Code Tags Please See YT Video on this: https://youtu.be/4BuPvWJV__k
 

10 More Discussions You Might Find Interesting

1. Programming

i-node problem

First , thank you for reading the post. I Use Digital Unix 4.0F . I get an i-node number of a text file using stat() function . I want to read the file context following the i-node information . But I do not know how to read disk information accroding to i-node information . (1 Reply)
Discussion started by: chenhao_no1
1 Replies

2. HP-UX

NTP problem

Hi, I have a problem using NTP. We have a setup as following : client --> HP Server(NTP) --> DMZ server --> DMZ server --> Internet Only some clients and our HP server is using NTP, the others are using different software. Now I get an error every day : Oct 1 13:17:15 nlunx1n1 xntpd:... (4 Replies)
Discussion started by: davidg
4 Replies

3. Solaris

NTP Authen Problem

Dear All I'm solaris user . I need to setup NTP authentication for my office server but I have some question for ntp setting up. I need to know if i set authen NTP the client that doesn't set for authen key can sync time from authen ntp server or not ?? when i setup the authen at ntp server ... (1 Reply)
Discussion started by: goasutlor
1 Replies

4. UNIX for Dummies Questions & Answers

NTP problem

All - i tried to sysn the clock from our server to get the timing and the server IP has been added in the ntp.conf file and i have some problems here. if some1 help me to solve this problem. 1. i can ping server 2. i was unable to ntpq -p (time out, no response from remote server, it looks... (2 Replies)
Discussion started by: March_2007
2 Replies

5. AIX

NTP Client problem

Hello everybody! When I run command "ntpdate" the following error occures "ksh: ntpdate: 0403-006 Execute permission denied. " # oslevel -s 5300-08-06-0918 oslevel -r 5300-08 eny suggestion friends? :-) (3 Replies)
Discussion started by: wwwzviadi
3 Replies

6. Red Hat

NTP sync problem

Hi, I have 4 machines and all are NTP configured with same ntp.conf file. But 3 machines are in sync with Time server and 4th machine is not contacting & sync with the NTP server. Please see the below details. # service ntpd stop Stopping ntpd: ... (0 Replies)
Discussion started by: uday123
0 Replies

7. Solaris

NTP problem.

Hi, I have edited the /etc/inet/ntp.conf file to point to a new time server. When I restart ntp on Solaris 10 using 'svcadm disable/enable ntp' it still points to the old ntp server when I run a 'ntpq -p'. Any ideas? Thanks. Sparcman (4 Replies)
Discussion started by: sparcman
4 Replies

8. UNIX for Advanced & Expert Users

NTP Problem

Hello every one i want to setup a ntp on sco unix 5.0.6 and i don't have any time server how can i do this with local time (1 Reply)
Discussion started by: kaydream
1 Replies

9. AIX

NTP time problem

I got an ntp time problem on AIX server. os version is AIX7.1 OS LEVEL 7.1.0.0 i got below output,when i run the below command bash-3.2# ntpdate -dv XXXXXXXXXXXXXXXXXXXXXXXX 4 Dec 12:50:49 ntpdate: 3.4y transmit(xxxxxxxxx) receive(xxxxxxxxx) transmit(xxxxxxxx) receive(xxxxxxxxx)... (9 Replies)
Discussion started by: murali969
9 Replies

10. AIX

GPS Clock Not Synchronised

Hi guys, I got some error on my application server mentioning that gps clock not sync to my db server. what is the command to check is my server is sync with the gps clock? appreciate if you guys can let me know how to troubleshoot this problem. Thanks (1 Reply)
Discussion started by: leecopper
1 Replies
NTP_ADJTIME(2)						      BSD System Calls Manual						    NTP_ADJTIME(2)

NAME
ntp_adjtime, ntp_gettime -- Network Time Protocol (NTP) daemon interface system calls LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/timex.h> int ntp_adjtime(struct timex *); int ntp_gettime(struct ntptimeval *); DESCRIPTION
The two system calls ntp_adjtime() and ntp_gettime() are the kernel interface to the Network Time Protocol (NTP) daemon ntpd(8). The ntp_adjtime() function is used by the NTP daemon to adjust the system clock to an externally derived time. The time offset and related variables which are set by ntp_adjtime() are used by hardclock() to adjust the phase and frequency of the phase- or frequency-lock loop (PLL resp. FLL) which controls the system clock. The ntp_gettime() function provides the time, maximum error (sync distance) and estimated error (dispersion) to client user application pro- grams. In the following, all variables that refer PPS are only relevant if the PPS_SYNC option is enabled in the kernel. ntp_adjtime() has as argument a struct timex * of the following form: struct timex { unsigned int modes; /* clock mode bits (wo) */ long offset; /* time offset (us) (rw) */ long freq; /* frequency offset (scaled ppm) (rw) */ long maxerror; /* maximum error (us) (rw) */ long esterror; /* estimated error (us) (rw) */ int status; /* clock status bits (rw) */ long constant; /* pll time constant (rw) */ long precision; /* clock precision (us) (ro) */ long tolerance; /* clock frequency tolerance (scaled * ppm) (ro) */ /* * The following read-only structure members are implemented * only if the PPS signal discipline is configured in the * kernel. */ long ppsfreq; /* pps frequency (scaled ppm) (ro) */ long jitter; /* pps jitter (us) (ro) */ int shift; /* interval duration (s) (shift) (ro) */ long stabil; /* pps stability (scaled ppm) (ro) */ long jitcnt; /* jitter limit exceeded (ro) */ long calcnt; /* calibration intervals (ro) */ long errcnt; /* calibration errors (ro) */ long stbcnt; /* stability limit exceeded (ro) */ }; The members of this struct have the following meanings when used as argument for ntp_adjtime(): modes Defines what settings should be changed with the current ntp_adjtime() call (write-only). Bitwise OR of the following: MOD_OFFSET set time offset MOD_FREQUENCY set frequency offset MOD_MAXERROR set maximum time error MOD_ESTERROR set estimated time error MOD_STATUS set clock status bits MOD_TIMECONST set PLL time constant MOD_CLKA set clock A MOD_CLKB set clock B offset Time offset (in microseconds), used by the PLL/FLL to adjust the system time in small increments (read-write). freq Frequency offset (scaled ppm) (read-write). maxerror Maximum error (in microseconds). Initialized by an ntp_adjtime() call, and increased by the kernel once each second to reflect the maximum error bound growth (read-write). esterror Estimated error (in microseconds). Set and read by ntp_adjtime(), but unused by the kernel (read-write). status System clock status bits (read-write). Bitwise OR of the following: STA_PLL Enable PLL updates (read-write). STA_PPSFREQ Enable PPS freq discipline (read-write). STA_PPSTIME Enable PPS time discipline (read-write). STA_FLL Select frequency-lock mode (read-write). STA_INS Insert leap (read-write). STA_DEL Delete leap (read-write). STA_UNSYNC Clock unsynchronized (read-write). STA_FREQHOLD Hold frequency (read-write). STA_PPSSIGNAL PPS signal present (read-only). STA_PPSJITTER PPS signal jitter exceeded (read-only). STA_PPSWANDER PPS signal wander exceeded (read-only). STA_PPSERROR PPS signal calibration error (read-only). STA_CLOCKERR Clock hardware fault (read-only). constant PLL time constant, determines the bandwidth, or ``stiffness'', of the PLL (read-write). precision Clock precision (in microseconds). In most cases the same as the kernel tick variable (see hz(9)). If a precision clock counter or external time-keeping signal is available, it could be much lower (and depend on the state of the signal) (read-only). tolerance Maximum frequency error, or tolerance of the CPU clock oscillator (scaled ppm). Ordinarily a property of the architecture, but could change under the influence of external time-keeping signals (read-only). ppsfreq PPS frequency offset produced by the frequency median filter (scaled ppm) (read-only). jitter PPS jitter measured by the time median filter in microseconds (read-only). shift Logarithm to base 2 of the interval duration in seconds (PPS, read-only). stabil PPS stability (scaled ppm); dispersion (wander) measured by the frequency median filter (read-only). jitcnt Number of seconds that have been discarded because the jitter measured by the time median filter exceeded the limit MAXTIME (PPS, read-only). calcnt Count of calibration intervals (PPS, read-only). errcnt Number of calibration intervals that have been discarded because the wander exceeded the limit MAXFREQ or where the calibration interval jitter exceeded two ticks (PPS, read-only). stbcnt Number of calibration intervals that have been discarded because the frequency wander exceeded the limit MAXFREQ/4 (PPS, read- only). After the ntp_adjtime() call, the struct timex * structure contains the current values of the corresponding variables. ntp_gettime() has as argument a struct ntptimeval * with the following members: struct ntptimeval { struct timeval time; /* current time (ro) */ long maxerror; /* maximum error (us) (ro) */ long esterror; /* estimated error (us) (ro) */ }; These have the following meaning: time Current time (read-only). maxerror Maximum error in microseconds (read-only). esterror Estimated error in microseconds (read-only). RETURN VALUES
ntp_adjtime() and ntp_gettime() return the current state of the clock on success, or any of the errors of copyin(9) and copyout(9). ntp_adjtime() may additionally return EPERM if the user calling ntp_adjtime() does not have sufficient permissions. Possible states of the clock are: TIME_OK Everything okay, no leap second warning. TIME_INS ``insert leap second'' warning. At the end of the day, a leap second will be inserted after 23:59:59. TIME_DEL ``delete leap second'' warning. At the end of the day, second 23:59:59 will be skipped. TIME_OOP Leap second in progress. TIME_WAIT Leap second has occurred within the last few seconds.. TIME_ERROR Clock not synchronized. ERRORS
The ntp_adjtime() system call may return EPERM if the caller does not have sufficient permissions. SEE ALSO
options(4), ntpd(8), hardclock(9), hz(9) http://www.bipm.fr/enus/5_Scientific/c_time/time_1.html http://www.boulder.nist.gov/timefreq/general/faq.htm ftp://time.nist.gov/pub/leap-seconds.list BUGS
Take note that this API is extremely complex and stateful. Users should not attempt modification without first reviewing the ntpd(8) sources in depth. BSD
July 13, 2005 BSD
All times are GMT -4. The time now is 08:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy