Tag Info

Hot answers tagged

72

This: date +%s will return the number of seconds since the epoch. This: date +%s%N returns the seconds and current nanoseconds. So: date +%s%N | cut -b1-13 will give you the number of milliseconds since the epoch - current seconds plus the left three of the nanoseconds. and from MikeyB - echo $(($(date +%s%N)/1000000)) (dividing by 1000 only ...


30

http://www.pool.ntp.org/ If you are in the US: United States — us.pool.ntp.org To use this pool zone, add the following to your ntp.conf file: server 0.us.pool.ntp.org server 1.us.pool.ntp.org server 2.us.pool.ntp.org server 3.us.pool.ntp.org Other pools around the world are available and can be found at the http://www.pool.ntp.org/ site.


21

The NTP algorithm includes information to allow you to calculate and fix the drift in your server's clock. NTPD includes the ability to use this to keep your clock in sync and will run more accurately than a clock on a computer not running NTPD. NTPD will also use several servers to improve accuracy. ntpdate does not keep any state to perform this service ...


20

It's a security feature to slow down people who are trying to guess your password. It takes Ubuntu the same amount of time to see if it's correct or not, but then it waits for a few seconds before letting you try again.


20

The Network Time Protocol, or NTP, can be used to synchronize the time on a server with an authoritative source. Windows Servers, for example, will use one of the network domain controllers (the DC which holds the PDC emulator FSMO role for the domain [thanks Graeme]) to get time information. You can configure the domain controller to get information from ...


19

Well for one your timestamps on all your logs will be off and out of sync with other servers making it very hard to figure out when things happened. Also, time synchronization is relied upon for some security protocols (kerberos for example). So what I'm saying is, most things will continue working normally, some protocols or applications relying on ...


19

This is easy to control. Configuration management is the key... Ensure that the ntp service is running and configured... For example, using Monit to make sure ntpd is running and to restart it if it fails is an easy approach... It may make sense to add cron and other essential daemons to that sort of check. Another option is using a configuration ...


18

Set everything to UTC. In addition to the examples user48838 mentioned, most things related to aviation are given in Zulu time (same as UTC/GMT). e.g. flight plans are filed with takeoff and landing times in UTC.


18

You can also do : dpkg-reconfigure tzdata It will then allow you to choose your timezone.


15

As with most things, "it depends". Are all of your administrators/users in the same timezone? Perhaps their TZ would be appropriate. Do the machines interact with the local environment? Local TZ might be good. Are all the logs pulled to a central location for analysis? UTC might help there. Do the machines communicate with each other in ways where time ...


14

As Dentrasi has explained - this is to make it more difficult for the attacker to carry out a brute-force attack on the password store. In almost all circumstances, you don't to change this behavior. If you have a good reason to (which I can't think of), you can modify it via /etc/login.defs - See the login.defs(5) man page. FAIL_DELAY (number) Delay ...


14

Jeff, I found this article. Might be of some help to you. You might have already read this but I thought it was worth a shot. HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config\AnnounceFlags This registry entry controls whether the local computer is marked as a reliable time server (which is only possible if the previous registry entry is set ...


12

Windows Time Agent is a free control panel applet for configuring the NTP server/synchronization ability of Windows. It acts as a front-end to the registry settings and lets you configure multiple NTP servers and see what sort of results you are getting from them in real-time. Not many people know about this particularly handy (and free) piece of software, ...


12

A very simple way is to just replace the leading space with zero: echo %TIME: =0% outputs: 09:18:53,45


12

As Kyle said w32tm /resync is the modern way to do this. See this Link to Microsoft Knowledgebase for more information on the w32tm command. There is also net time which is an older version but perhaps easier.


12

It looks as if it was implemented recently for Quantal (12.10) : see http://brainstorm.ubuntu.com/idea/17829/ . Basically, dmesg is reported to have a new switch -T, --ctime. Edit. As another extension on Ignacio's answer, here are some scripts to enhance dmesg output on older systems. ( Note: for the python version of the code shown there, one will ...


12

Unless extremely accurate timekeeping is mission-critical for you there should be no discernible effect for your users, aside from their clocks changing by 2 minutes. The possible exception is if they declare your NTP server to be "insane" as a result of the large change (which would require you to restart the NTP service on the affected systems to force ...


11

More seriously, document whatever it is I'm working on. Especially now that I'm getting older, I find it more and more useful to have detailed notes of what I do. I'm always keeping step by step notes of what I've done.


10

I know how to change the time and I belive we setup an NTP server on the DC and ensured time-sync was turned off on Hyper-V. Virtual Machines can't track time. You may want to try setting up the DC up as an NTP client. This blog might be useful. http://www.aperture.ro/index.php/2009/01/windows-time-sync-hyper-v-enabled-domain-controller-dilemma/ The ...


10

As you discovered, ntpdate is a one-shot deal. You want ntpd.


10

There are a variety of check_ntp plugins for nagios out there. Here's one: http://nagiosplugins.org/man/check_ntp Add this check to your nagios host and get alerts if anything goes awry.


9

You can use the following command: w32tm /resync


9

I have been through this before. Try (on domU): echo 1 > /proc/sys/xen/independent_wallclock and try updating the time again.


9

if you run a NTP daemon you will not have this problem, it will speed up/slow down your clock so it gets synchronized over time rather then jumping.


9

Shouldn't be a problem. Just create a zone on your DNS server called 'time.windows.com'. We do it all the time for various things we want to override. You can also try handing out the NTP server parameter (option ntp-servers) on your DHCP server. Windows may not pick it up, but it couldn't hurt.


8

When synchronized time is important, I use NTPD for windows http://www.meinberg.de/english/sw/ntp.htm I install it, point it at north-america.pool.ntp.org and forget it


8

ntpd is preferred over ntpdate because you get smooth time correction rather than jumps in your clock. What sense do you make of your logs when there's a backwards time jump in them? ntpdate will also transparently switch between servers as needed. As for requiring open ports (as mentioned by Kyle), newer versions of ntpd (e.g. 4.2.4 on my Debian server) ...


8

On the domain controller holding the PDC Emulator flexible single-master operations (FSMO) role in the forest root domain of your Active Directory forest should have an external-to-the-forest time source specified. On every other DC, time synchronization should be handled by the "Windows Time" service automatically. The DCs in each domain will sync with ...



Only top voted, non community-wiki answers of a minimum length are eligible