Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Lets say you have a server that stores records, and the time stamp that goes into the mysql/postgres/text-file/whatever is vital to be accurate (lets pretend it's a physics experiment, or bank transaction auditing system).

My server's always end up out of time bit by bit each day (this may be due to existinging inside a VM?). I can run ntpdate every day, manually, which is a total pain, but I dont want to do that, and have a feeling it may not be a good solution at all for high precision time tracking.

What should I do to ensure my computer is never off by more than 0.05 seconds? I want to be able to walk away from it for 5 years and have it running accurate time when I come back.

Note: This is ubuntu-server, CLI commands only, there is no GUI.

share|improve this question
0.05 seconds is 50 milliseconds, which is a lot different than microseconds. Which did you really mean? – psusi Apr 19 '11 at 19:26
I'm generally seeking precision better than a second, I imagine a microsecond may be difficult to track on a standard CPU without some sort of external higher-precision /dev connected. – Incognito Apr 19 '11 at 19:46
Indeed, you are going to need an atomic clock for microseconds. NTP serves quite well for +/- 50 milliseconds. – psusi Apr 20 '11 at 0:46
up vote 2 down vote accepted

Please install ntp (not ntpdate) and add some time servers to your configuration.

See and the linked page to ntp here:

share|improve this answer

I'm not sure if this will be of any assistance, but I think you would need a real-time-kernel to do time sensitive, bank, automation etc.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.