Red Hat This forum is for the discussion of Red Hat Linux.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Tags used in this thread
Popular LQ Tags
time , centos
10-26-2009, 11:05 PM
#1
LQ Newbie
Registered: Jan 2009
Posts: 6
Thanked: 0
synchonize time in centos (urgent)
[
Log in to
get rid of this advertisement]
Dear All,
I'm using VPS with OS CentOS to hosting website, but the time can not synchronize with my time zone.
Who can help me?
Thank you.
Last edited by tdnguyenitvn; 10-26-2009 at 11:12 PM ..
10-27-2009, 12:09 AM
#3
LQ Newbie
Registered: Jan 2009
Posts: 6
Thanked: 0
Original Poster
Quote:
Originally Posted by
foodown
I do that before, but it's still can not.
How can i do with crontab to schedule synchronize about 5 minutes?
thank you
10-27-2009, 12:27 AM
#4
Member
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 219
Thanked: 114
As root, do a 'crontab -e'
Then add this line:
Code:
*/5 * * * * /usr/sbin/ntpdate pool.ntp.org 1> /dev/null 2> /dev/null
Save and quit with a ':wq'
Did you follow the link that I posted?
10-27-2009, 12:54 AM
#5
LQ Newbie
Registered: Jan 2009
Posts: 6
Thanked: 0
Original Poster
Quote:
Originally Posted by
foodown
As root, do a 'crontab -e'
Then add this line:
Code:
*/5 * * * * /usr/sbin/ntpdate pool.ntp.org 1> /dev/null 2> /dev/null
Save and quit with a ':wq'
Did you follow the link that I posted?
I follow already but it can not synchronize.
Thank you, i will add this schedule to the crontab.
10-27-2009, 01:01 AM
#6
Member
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 219
Thanked: 114
What makes you say that it cannot synchronize . . . what are you seeing that indicates this to you?
10-27-2009, 01:45 AM
#7
LQ Newbie
Registered: Jan 2009
Posts: 6
Thanked: 0
Original Poster
Quote:
Originally Posted by
foodown
What makes you say that it cannot synchronize . . . what are you seeing that indicates this to you?
The time on my server always run fast than real time.
When i use with your crontab but it still can not run correct.
10-27-2009, 02:10 AM
#8
Member
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 219
Thanked: 114
So, first off, what timezone are you in?
Please post the output of:
Code:
ls -l /etc/localtime
ls -Rl /usr/share/zoneinfo
ntpdate pool.ntp.org
date
ntpdate pool.ntp.org
date
10-27-2009, 02:34 AM
#9
LQ Newbie
Registered: Jan 2009
Posts: 6
Thanked: 0
Original Poster
ls -l /etc/localtime
lrwxrwxrwx 1 root root 31 Oct 27 10:22 /etc/localtime -> /usr/share/zoneinfo/Asia/Saigon
ntpdate pool.ntp.org
27 Oct 13:33:03 ntpdate[2645]: step time server 221.132.37.28 offset -344.029524 sec
date
Tue Oct 27 13:33:55 ICT 2009
10-27-2009, 03:05 AM
#10
Member
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 219
Thanked: 114
How long does it take to get fast?
I mean, if you run two ntpdate calls back to back, is there a significant offset on the second run?
10-27-2009, 03:37 AM
#11
LQ Newbie
Registered: Jan 2009
Posts: 6
Thanked: 0
Original Poster
Quote:
Originally Posted by
foodown
How long does it take to get fast?
I mean, if you run two ntpdate calls back to back, is there a significant offset on the second run?
about 2 seconds. after 5 minutes it will run fast than with real time about 1 minute.
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT -5. The time now is 07:57 PM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News
LQ Podcast
LQ Radio