Feeding GPS Time to a Private NTP Server?
farrellj asks: "I have a customer that wants to be able to sychronise time on hundreds of servers that are spread all across the continental US and Hawaii. He was using publicly accessable NTP servers, but would rather have his own server that is not dependant on outside servers, and not have to worry about NTP based attacks. You can get a good quality and accurate time from GPS, so he looked at using a GPS reciever hooked up to a machine in his server room, but none of the GPS software out there seem to be able to just pull out the time, and then feed it to an NTP server. Has anyone tried to do this before, or know of a program that will read at GPS reciever and feed it to a NTP server process?"
I know of at least one package I've used in a completely different situation that can pull down the datetime and gps reading through the serial connection, and has a programming API. Now, this was in windows but I'm sure its available for flavors of unix as well.
Trimble's Pathfinder. If you need some code I may be able to dig some up. A warning, it'll be in VB, but it works.
--onyx--
I use Remco Treeffkorn's GPSD to read data off of GPS devices in my tracking library (libtracking-- see interreality.org)
http://russnelson.com/gpsd/
VOS/Interreality project: www.interreality.org
This is the result of a quick googleing. Have you looked at this type of product? http://www.lantronix.com/products/nts/ntpe1_tr1/in dex.html
Buy a Serial Data GPSAnd Grep the detail from the output.
Little Program can easily be found on google (search NMEA GPS).
List of Progs
Here is a simple one
Two Standard Exist for the GPS Output NMEA. Most can provide this information via RS232
Less Than 20 Char to read from the Port. Automatically received once per second. Parse the data with PERL/AWK/SED/JAVA/C it's very simple.
Ntpd supports many GPS reference clocks directly, so you don't need any special software to "pull out the time, and then feed it to an NTP server".
RFC1925
ntp.org. Did you even look? There are plenty of gps recievers capable of providing a pps signal to ntpd.
http://www.endruntechnologies.com/
they have boxes that sync off of either gps or cdma (for those places where you can't get a good view of the sky). the gps model with the stock oscillator can go several hours without satellites before it drifts too far and only needs a single satellite rather than a full multi-sat lock to sync its clock. upgraded oscillators are available for better and longer term stability. we use the gps version at our observatory to provide ~1 ms time over the network via ntp and ~10 us or better time via the PPS and kPPS outputs. we looked into hooking external gps receivers to PCs running ntpd via serial and PPS, but these praecis boxes are a much easier to configure and maintain solution to the problem and likely more robust as well.
tim
hiding in shadows / i hear you coming closer / you will explode soon -- a quake haiku
--Mike--
How to find the answer to the question the user has posed:
This has to be the lamest question in the history of "Ask Slashdot".
<Whine>
</Whine>
How about something cheaper than a GPS
1 .html
Check out this article.
http://www.linux-mag.com/2000-12/guru_0
Here they tell you where to buy an Atomic Time PC Deskclock with serial interface. $99.00 plus s+h.
http://www.arctime.com/
The article provides an expect script to read the data from the clock. This is cool for UNIX servers. For Windows servers, use perl with the expect module to retrieve the time, then use the "Time" command to set the time.
Cross platform creaminess at a fraction of the cost!
You could also cheese out and use the windows software that comes with the clock, if you are a slacker.
Something like this
www.ntp.org the official NTP site. Links to code, hardware, documentation, you name it.
Also check out NIST's list of Manufacturers of Time and Frequency Receivers.
Here's a good link that has information on syncing your private NTP server to GPS.
-Turkey
If you are an NTP client behind an appropriate firewall, are you vulnerable to NTP based attacks? One would think not. At least not anymore than normal.
Just use NTP and be done with it. Besides, it's much easier to implement. Hell, use one server as the public NTP client, and then have the rest of your servers poll the previous machine. You could do that a couple of times considering the machines that are all over the US...
I still don't understand the question - at least what the issue *really* is. Besides, wouldn't the GPS solution cost a bit more?
Phil
no images due to a disk crash, but this has interesting information about high-precision NTP from GPS on FreeBSD, including an excellent trick to reduce jitter introduced by the usual low-quality PC xtal.
They have a 1U hardware unit that does a 6-channel GPS time sync, and has all kinds of crazy outputs for your ntp machine (IRIG-B, pps, ppm, etc). But better yet, you could just plug an ethernet jack into their box and it has an ntp serevr built in. Ideally you'd make this your tier-1, and put a couple of unix NTP boxen in the second tier to serve to other machines - you don't want tons of clients hitting the ntp port on the little hardware box.
As a meta note - this is one of many similar peices of hardware available out there from many companies. It took one google search for "GPS NTP hardware", and this was like the fourth link on the page. This is not ask slashdot material, it's just a dumb question from someone who can't use a search engine.
11*43+456^2
He's going to put the GPS in his server room? Ever tried getting a signal inside a building, you can't. You're going to have to buy a GPS with an external antenna connector and stick an antenna outside your building.
Need Free Juniper/NetScreen Support? JuniperForum
The NMEA feed is not in sync with the actual clock, nor is the delay consistent. It's useless for synching NTP. One needs access to the PPS line from the GPS module, which pretty much means buying the OEM module and building the support (power, ports -- they're plenty of schematics for this out on the net) or buying one of the ready made clocks.
Here. Try this for a start.
Of course, if you only need per-second precision, and you really want to go cheap, get a handheld GPS off the pegboard at Wal-Mart and use one of the software packages mentioned elsewhere, but don't expect the same level of precision as the dedicated units mentioned.
Note to Editors: For "ask Slashdot" posts, please at least TRY to do a "google" on the question to see if it is lame or not.
(Modded down as irrelevant/troll/slam on the editors)
LongTail SSH Brute Force analysis tool is here!
While it's true that GPS units can be used as a time standard, it's not the best solution to this problem. GPS uses satellites the power is very limited and you can't use them indoors.
A much better solution is to use a standard shortwave receiver that can pick up the digital time signal from WWV. That signal is much stronger and can probably be picked up inside most buildings (perhaps with a simple antenna) in most of the country. That's why this is the signal used by desktop "atomic clocks." You might be able to use one of them as a time source, but I would suggest checking the NTP documentation for recommendations for hardware that supports PPS signals. There's also some websites describing DIY radio receiver hardware.
The downside of this approach is that there's a propogation delay in the ground signal. GPS should give you the current time accurate to microseconds, while the radio delay may be in the milliseconds. (Ground waves are closer to a signal down a wire than a signal through free space, so the prop speed is well under 'c'.) This should not be an issue except for the most demanding uses.
For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken
I have a cheap NavMan GPS receiver for my palm III (bought when Rand Mcnally dropped the price to $50) which reports the time about 5 minutes off!
I'm using Compass from gpspilot.com to view the NavMan's data. The Lat/Lon are reported correctly, as is the altitude. As such, the heading and speed calculations also come out correct. What's really odd to me is that it works at all if it doesn't know the correct time -- I thought that's the whole idea behind GPS.
Please don't try to blame my watch for the problem -- I live and work in Boulder and set my watch to the definition of Correct Time.
For a good time, call 303-499-7111.
I rolled my own solution some time ago. The cheap EarthMate GPS from Delorme can be used with Linux 2.2.19 for this.
See: http://www.floatingdoghead.net/source
I can be contacted through my web page.
--
Jack Bates
Portland, OR, USA
There are a number of purpose built systems that are designed as highly accurate NTP stratum 1 servers, with GPS input.
These are rack-mountable 1u servers designed for service provider environments. I have deployed several such systems.
Have a look at TrueTime" for an example.
Some of these systems are Linux/ntpd/gpsd based, but come with support and in a turn-key format with Web based GUI.
Slashdot is community-controlled when it reduces the admin's work.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
Here's a PDF with some info on their different instruments. The first half of the document is GPS theory, the rest is the different instruments.
From the pictures, a couple of them look to be rack-mountable.
Introduction to GPS timing solutions
Gps generally does not work indoors :) Generally it dosen't even work through tree leaves, car roofs or anywhere thats not line of sight. You may wish to consider this.
Religion is a gateway psychosis. -- Dave Foley
I'm sure there is a reason why what I do is lame, but why not firewall NTP, and run an NTP server inside that does the following cronjob:
/usr/sbin/ntpdate time.nist.gov /usr/sbin/ntpdate time.nist.gov
1 0 * * *
1 12 * * *
It keeps my server sync-ed to no more than 0.8 seconds of drift at any given time.
Look at clockspeed as an alternative to other NTP clients. It's a package of programs that allow a computer to calculate any skew in its own clock, so it doesn't have to constantly query an NTP server for the accurate time.
You may find that you won't need an in-house NTP server after all.