LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-17-2017, 10:13 AM   #1
Linuxuser1987
LQ Newbie
 
Registered: Jun 2017
Posts: 10

Rep: Reputation: Disabled
Time sync issue in redhat system


In my redhat system, the time is showing 30 mins less than actual time.When I modify the time to actual time,after 3 mins it reverse back to previous time. Ntp is stopped.

I am getting below message from log

Jun 17 19:50:32 rzsbcx10 ntpd[4969]: ntpd exiting on signal 15
Jun 17 19:50:33 rzsbcx10 ntpd: ntpd shutdown succeeded

Pls give any solution.
 
Old 06-17-2017, 11:01 AM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.8.2003
Posts: 5,441

Rep: Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070
How are you "modifying" the time to the actual time?
Why is ntp stopped?
 
Old 06-17-2017, 11:50 AM   #3
Linuxuser1987
LQ Newbie
 
Registered: Jun 2017
Posts: 10

Original Poster
Rep: Reputation: Disabled
I am modifying through ntpdate by syncing with external clock.I stopped the ntpd manually so that the time can't change automatically.
 
Old 06-17-2017, 12:15 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,555

Rep: Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088
If this is Red Hat 7, it uses chronyd, not ntpd, for time synchronization.
 
Old 06-17-2017, 12:55 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,620

Rep: Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185
What version of Red Hat are you running?

It this a real or virtual machine?

Are you syncing to a NTP pool server or an internal network timeserver?
 
Old 06-17-2017, 01:00 PM   #6
Linuxuser1987
LQ Newbie
 
Registered: Jun 2017
Posts: 10

Original Poster
Rep: Reputation: Disabled
Red Hat Enterprise Linux AS release 4 (Nahant Update 5)
 
Old 06-17-2017, 01:01 PM   #7
Linuxuser1987
LQ Newbie
 
Registered: Jun 2017
Posts: 10

Original Poster
Rep: Reputation: Disabled
its a real machine
 
Old 06-17-2017, 01:01 PM   #8
Linuxuser1987
LQ Newbie
 
Registered: Jun 2017
Posts: 10

Original Poster
Rep: Reputation: Disabled
internal network timeserver
 
Old 06-17-2017, 01:06 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,620

Rep: Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185
What about the other questions?

If ntpd is shutdown there should be no other process that should automatically update time unless you have some cron job that runs ntpdate.

Can you post your ntp.conf file? How does the internal time server sync time?

Last edited by michaelk; 06-17-2017 at 01:07 PM.
 
Old 06-17-2017, 04:27 PM   #10
Linuxuser1987
LQ Newbie
 
Registered: Jun 2017
Posts: 10

Original Poster
Rep: Reputation: Disabled
I have added a cron job of ntpdate to sync with network timeserver.
#30 05 * * * /usr/sbin/ntpdate 10.201.130.89; /sbin/hwclock -w

But due to this problem I have disable this cron job and manually update the time using ntpdate but after sometime system time automatically changes but hwclock remain same.
Attached Files
File Type: txt ntp.txt (2.6 KB, 13 views)
 
Old 06-17-2017, 05:02 PM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,620

Rep: Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185
Code:
# --- OUR TIMESERVERS ----- 
#server 0.pool.ntp.org
#server 1.pool.ntp.org
#server 2.pool.ntp.org
server 127.127.1.0
Not sure if you commented out all the servers to troubleshoot your time problem? There must be another ntpdate cron job running somewhere. Check the logs.

Check the running processes. Are you sure ntpd is not running?
 
Old 06-17-2017, 05:29 PM   #12
Linuxuser1987
LQ Newbie
 
Registered: Jun 2017
Posts: 10

Original Poster
Rep: Reputation: Disabled
Yes I have commented out those servers for troubleshoot.


I am checking with command

Service ntpd status and it is showing ntpd is stopped.

Not sure another cron job isrunning or not.How to check? except "crontab -l"
 
Old 06-18-2017, 05:48 PM   #13
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,620

Rep: Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185Reputation: 4185
Check the cron logs /var/log/cron

The system cron files are located here:

/etc/cron.d
/etc/cron.daily
/etc/cron.hourly
/etc/cron.monthly
/etc/cron.weekly
/etc/crontab
 
Old 06-19-2017, 02:40 AM   #14
Linuxuser1987
LQ Newbie
 
Registered: Jun 2017
Posts: 10

Original Poster
Rep: Reputation: Disabled
[root@rzsbcx10 ~]# cd /etc/cron.d
[root@rzsbcx10 cron.d]# ls
sysstat
[root@rzsbcx10 cron.d]# more sysstat
# run system activity accounting tool every 10 minutes
*/10 * * * * root /usr/lib/sa/sa1 1 1
# generate a daily summary of process accounting at 23:53
53 23 * * * root /usr/lib/sa/sa2 -A

[root@rzsbcx10 cron.d]# more /etc/cron.daily

*** /etc/cron.daily: directory ***

[root@rzsbcx10 cron.d]# more /etc/cron.hourly

*** /etc/cron.hourly: directory ***

[root@rzsbcx10 cron.d]# more /etc/cron.monthly/

*** /etc/cron.monthly/: directory ***

[root@rzsbcx10 cron.d]# more /etc/cron.weekly/

*** /etc/cron.weekly/: directory ***

[root@rzsbcx10 cron.d]# more /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
 
Old 06-20-2017, 03:24 AM   #15
Linuxuser1987
LQ Newbie
 
Registered: Jun 2017
Posts: 10

Original Poster
Rep: Reputation: Disabled
I have stopped the cron job using command service crond stop but still time is changing.
 
  


Reply


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
Time Sync in Redhat Cluster servers thkreddy Linux - Server 2 05-13-2015 03:36 AM
how to set and sync system time with time server?? servnov Linux - Newbie 6 12-03-2013 07:55 PM
Sync system time ust Linux - Newbie 9 05-17-2012 03:39 AM
Time Sync issue on RHEL 5.3 Uday123 Red Hat 1 10-08-2009 01:15 AM
NTP sync time issue... smartyshan Linux - Server 5 06-23-2009 02:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:34 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration