LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 12-18-2001, 03:22 PM   #1
Steave
Member
 
Registered: Jul 2001
Location: Braunschweig, Germany
Distribution: Suse 7.2
Posts: 184

Rep: Reputation: 30
Updating System time from some Inet time server


Hi everybody, I just stumbled across XP getting its time from microsoft on every boot. I'd love for my Linux-box to get its system time from some time-server on the internet, too!

There's gotta be a way... I just don't know how!

I guess I need
a: some kind of prog/shell script to update the time
b: The URL/IP of a reliable time-server

Thanx!
 
Old 12-18-2001, 04:48 PM   #2
bluecadet
Member
 
Registered: Oct 2001
Distribution: MD81 RH71
Posts: 555

Rep: Reputation: 30
it's an absolute doddle.

you use rdate locally, and just need to find a decent time server. i found some, but i can't remember the address...

gone surfing....

http://www.august.net/settime.html

their servers seem good enough, and the other info there might be useful. BUT you don't really need all that.... assuming you're online no boot... stick this in your rc.local

rdate -s tick.august.net

come on... could it get an easier?!
 
Old 12-19-2001, 11:36 AM   #3
finegan
Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 57
This is basically the same thing Bluecat is pointing out, but the standalone as opposed to the server.

If you dig compiling things on your own, try this little toy. I think this is exactly what you're aiming for. Scuttlebutt is that MS ripped off this code.
Netdate

The best way to use it is:

netdate ntp1.(insert major university here).edu

No kidding, pretty much every college and a lot of business run time servers. These tier 1 time servers in turn update from the Cesium clock and blah blah blah super geekdom. Best to choose one in your timezone though :P

Then just stuff the line in rc.local and time is set every boot.

Cheers,

Finegan

Last edited by finegan; 12-19-2001 at 11:39 AM.
 
Old 12-19-2001, 11:47 AM   #4
Steave
Member
 
Registered: Jul 2001
Location: Braunschweig, Germany
Distribution: Suse 7.2
Posts: 184

Original Poster
Rep: Reputation: 30
Thanx everyone! Got that figured out... Even found some "administrative" time server for my time zone!

If anyones interested: Timezone:

CET (Germany, France, ...)
ntp1.ptb.de or ntp2.ptb.de

See ya!
 
Old 12-20-2001, 09:47 AM   #5
Posterboy
Member
 
Registered: Oct 2001
Location: Lilburn, Ga.
Distribution: RH
Posts: 77

Rep: Reputation: 15
The way this is done, generally, is called NTP, the Network Time Protocol. Atomic clocks around the world make this available. Need to run xntpd, small, and requires no attention at all. I did a page for RH and Deb at:
www.raymondjones.net/ntpguide.html
HTH, Ray
 
Old 12-20-2001, 09:07 PM   #6
JimKyle
Member
 
Registered: Dec 2001
Location: Oklahoma City, OK, USA
Distribution: Xubuntu 12.04 LTS
Posts: 156

Rep: Reputation: 18
Talking

I like Trevor's approach best, but since I try not to reboot very often I put the rdate command into a script and stored it in my /etc/cron.daily directory. This way it updates at 4 a.m. every morning rather than waiting for a reboot that may not happen for weeks! I didn't have rdate installed on my system, but it was on the Mandrake CDs and took only a few minutes to get it rolling. The technique for getting cron to do it may vary for other distributions; I'm using Mandrake 8.1...
 
Old 12-21-2001, 02:12 PM   #7
bluecadet
Member
 
Registered: Oct 2001
Distribution: MD81 RH71
Posts: 555

Rep: Reputation: 30
well, it seems a little like overkill to me, running a daemon just to make sure the ime is right. Why should there be any reason to think that the clocks were wrong in the first place. i only sussed out what i did cos the clocks in my network were wonky, so pinging always gave me that annoying 'taking counter measures' message and such like. i can guess that the mem usage of ntpd it pretty minimal, but throwing resources around like that... nrrg , no thanks. i would also even think that setting the clock form a server online every single timei turn the computer on is a bit daft in principle, but it forks into the backgorund for the 3 seconds it's running for... so that can be ignored really. the cron option is the other obvious choice. any more measures than that i think are a bit daft tho. But then on a critical system it might be appropriate.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set and sync system time with time server?? servnov Linux - Newbie 6 12-03-2013 07:55 PM
Setting the system clock to a time server? orange400 Linux - General 4 06-13-2005 01:59 PM
How to syncronize my system time by public time server? hakansun Linux - Networking 1 09-10-2004 05:10 AM
Setting System Time: kernel in wrong time zone warrenweiss Linux - General 7 05-15-2004 03:25 PM
System will automatically close my x server after a certain idle time. ICO Slackware 1 02-16-2004 11:26 AM


All times are GMT -5. The time now is 07:27 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration