Time synchronization from terminal

Is there a command from terminal to synchronize time? I need to do this from a shell script.
Thanks!

I believe you want ntpdate. There's also the query utility, ntpq. Use "man command" in the Terminal for the man pages.

Similar Messages

  • Start Time Machine from Terminal?

    Is there a way to start a Time Machine "Backup Now" via Terminal?

    /System/Library/CoreServices/backupd.bundle/Contents/Resources/backupd-helper

  • How to configure time synchronization for two NTP servers

    We have IOSXR 4.2.1 on routers CRS3 and ASR9K with all recomended SMUs; we need to configure the time synchronization for two NTP servers with the configuration below, but the routers became unstable; synchronize with one NTP servers for some time, then switch to other NTP server, and keep doing this. Anyone know why this behavior?
    ntp
    authentication-key 1 md5 encrypted 01070F074F0A05
    authenticate
    trusted-key 1
    server 10.192.32.32 prefer
    server 10.192.32.33
    source Loopback50
    update-calendar
    RP/0/RP0/CPU0:DFCRSDTC1#sh log | i ntp
    Wed Jul 10 09:37:04.621 BRSPO
    RP/0/RP0/CPU0:Jul  4 21:29:18 : ntpd[256]: %IP-IP_NTP-5-SYNC_LOSS : Synchronization lost : 10.192.32.32 : Peer unreachable or clock selection failed
    RP/0/RP0/CPU0:Jul  4 21:29:18 : ntpd[256]: %IP-IP_NTP-5-HP_CONN_LOST : High priority NTP peer connection lost - Stratum 2->15.
    RP/0/RP0/CPU0:Jul  4 21:29:18 : ntpd[256]: %IP-IP_NTP-5-ALL_CONN_LOST : All NTP peer connections failed.
    RP/0/RP0/CPU0:Jul  4 21:29:27 : ntpd[256]: %IP-IP_NTP-5-HP_CONN_RECOVERED : High priority NTP peer connection recovered - Stratum 15->2.
    RP/0/RP0/CPU0:Jul  4 21:30:21 : ntpd[256]: %IP-IP_NTP-5-SYNC_LOSS : Synchronization lost : 10.192.32.32 : Peer unreachable or clock selection failed
    RP/0/RP0/CPU0:Jul  4 21:30:21 : ntpd[256]: %IP-IP_NTP-5-HP_CONN_LOST : High priority NTP peer connection lost - Stratum 2->15.
    RP/0/RP0/CPU0:Jul  4 21:30:21 : ntpd[256]: %IP-IP_NTP-5-ALL_CONN_LOST : All NTP peer connections failed.
    RP/0/RP0/CPU0:Jul  4 21:31:36 : ntpd[256]: %IP-IP_NTP-5-HP_CONN_RECOVERED : High priority NTP peer connection recovered - Stratum 15->2.
    RP/0/RP0/CPU0:Jul  4 21:35:56 : ntpd[256]: %IP-IP_NTP-5-SYNC_LOSS : Synchronization lost : 10.192.32.33 : Peer unreachable or clock selection failed
    RP/0/RP0/CPU0:Jul  4 21:35:56 : ntpd[256]: %IP-IP_NTP-5-HP_CONN_LOST : High priority NTP peer connection lost - Stratum 2->15.
    RP/0/RP0/CPU0:Jul  4 21:35:56 : ntpd[256]: %IP-IP_NTP-5-ALL_CONN_LOST : All NTP peer connections failed.
    RP/0/RP0/CPU0:Jul  4 21:40:11 : ntpd[256]: %IP-IP_NTP-5-HP_CONN_RECOVERED : High priority NTP peer connection recovered - Stratum 15->2.
    RP/0/RP0/CPU0:Jul  4 21:50:52 : ntpd[256]: %IP-IP_NTP-5-SYNC_LOSS : Synchronization lost : 10.192.32.33 : System clock selection failed
    RP/0/RP0/CPU0:Jul  4 21:50:52 : ntpd[256]: %IP-IP_NTP-5-HP_CONN_LOST : High priority NTP peer connection lost - Stratum 2->6.
    RP/0/RP0/CPU0:Jul  4 21:59:26 : ntpd[256]: %IP-IP_NTP-5-HP_CONN_RECOVERED : High priority NTP peer connection recovered - Stratum 6->2.
    RP/0/RP0/CPU0:Jul  4 22:25:07 : ntpd[256]: %IP-IP_NTP-5-SYNC_LOSS : Synchronization lost : 10.192.32.33 : System clock selection failed
    RP/0/RP0/CPU0:Jul  4 22:25:07 : ntpd[256]: %IP-IP_NTP-5-HP_CONN_LOST : High priority NTP peer connection lost - Stratum 2->6.
    RP/0/RP0/CPU0:Jul  4 22:56:16 : ntpd[256]: %IP-IP_NTP-5-SYNC_LOSS : Synchronization lost : 10.192.32.33 : Peer unreachable or clock selection failed
    RP/0/RP0/CPU0:Jul  4 22:56:16 : ntpd[256]: %IP-IP_NTP-5-ALL_CONN_LOST : All NTP peer connections failed.

    Hi Claudio, that ddts is pretty generic to be honest but yes it is filed to address sync issues in the XR NTP algo.
    The thing is that XR ntp clock selection is a bit different then iOS and follows the specs very closely which results in this erroneous loss behavior.
    For instance, you could also see this issue with a sync loss if the update time is only 500msec off what it was before and that will result in a ntp sync loss rather then adjusting to it.
    Also I wanted to mention that the ntp prefer is a bit of a misnomer in XR (since it follows the specs differently then IOS) and this knob was taken over from IOS really.
    You might get some joy if you set it to one server only and see if that helps?
    regards
    xander

  • This pops up when exporting in iMovie "Unable to prepare project for publishing: The project could not be prepared for publishing because an error occurred. (ParamErr: error in user parameter list)" I have turned off my Time Machine in terminal.

    This pops up when exporting in iMovie "Unable to prepare project for publishing: The project could not be prepared for publishing because an error occurred. (ParamErr: error in user parameter list)" I have turned off my Time Machine in terminal yet it remains. What do I do, I need your help PLEASE.

    Hi
    Error -50 paramErr  Error in user parameter list
    Can there be any external hard disks - if so How is/are it/they formatted ? Must be Mac OS Extended (hfs) if used for Video.
    UNIX/DOS/FAT32/Mac OS Exchange - works for most but not for VIDEO.
    What this means in Your situation is above me.
    • free space on internal boot hard disk? How much ?
    Video codec
    • streamingDV, AIC etc. (not .avi, .mp4, .m4v, .wmv etc as they are containers not codecs)
    Pictures
    • in what format ? .jpg, .bmp, .tif, else ?
    Audio
    • from where/what format ? iTunes, .avi, .mp3, .aiff, else ?
    The "com.apple.iMovie.plist" file
    Many users has not observed that there are TWO libraries.
    • Library - at root level
    • Library - in user/account folder - THIS IS THE ONE to look into
    from Luke Burns
    I fixed the problem.. but it was very, very strange. I had a very long section for credits and set the line spacing to 1.0.. for some reason this caused it. I removed it, and it worked fine. I put it back, and I couldn't preview or play the video.
    I don't know why that could cause that big of a problem, but it did..
    Klaus1
    You need more free space on your hard drive.
    jonorparkerjon
    After phone support from apple I ended up creating a new project and adding all 117 clips back in individually till I found out what clips flagged and would not allow me to export. I had 3 I deleted and replaced and everything works now 1hr after tedious work....
    Where do Your material come from
    • Camera
    • External hard disk
    • USB-memory
    And all are connected so that iMovie can find it ?
    Yours Bengt W

  • How do I see the time stamp from footage

    I was wondering if it is possible to see time stamps from footage taken by GoPro camera in FCPX. I can see the duration of the clips and the DATE it was created. I would like to see the actual time it was created. I have 2 cameras that were shooting at the same time and I would like an easier way of sifting through all of the clips to mary them up.
    Is there a way to see the time stamp of when the video was taken?
    Thanks

    Got ya. I will suggest one more thing: You can add "markers" at points where you can visually (or aurally) see (or hear) a synch point. Once you add these markers, "synchronize clip" will begin to grind out the rest.
    Again, if you look at the above tutorial, I think it explains this under "manual" synch.
    I don't mean to push this upon you, but... FCPX is GREAT for multi-cam synch. It is the best--I think--in the industry.
    Good luck. Sorry if I'm of little help beyond this.

  • In OS 10.6.8 how do I turn on printer sharing from terminal?

    I have a Mac Pro and I need to share a printer, however every time I go to sharing and try to select printer sharing preferences crashes. Is there a way to turn on printer sharing from termina?

    In Finder hold down the option/alt key while selecting the Go menu item. Select Library. Then go to Preferences/com.apple.systempreferences.plist. Move the .plist to your desktop.
    Restart and test. If it works okay, delete the plist from the desktop. 
    If the same, return the .plist to where you got it from, overwriting the newer ones.
    If you want to make your user library permanently visible, run the below command in Applications/Utilities/Terminal.
    chflags nohidden ~/Library/
    You will need to do that after any updates.

  • Time Sync from Child domain to Parent doamin

    Now the time in our child domain is fast 2 Mins than parent domain, how to sync the time by what command ?

    Hi,
    By default, the PDC Emulator of the Forest Root Domain is considered as the best time source in an Active Directory forest. Other domain controllers
    in the Forest Root Domain use it for time synchronization while domain controllers in child domains use the PDC Emulator or any domain controller from parent domain for time synchronization. Member servers and Workstation use domain controllers in their domain
    for time synchronization. With this hierarchy, we can maintain a reliable time synchronization system that allows avoiding Kerberos failure issues in an Active Directory domain. This configuration is by default in an Active Directory forest and does not need
    to be changed.
    As mentioned by SH.Hashemi, we can run command
    w32tm\resync to resynchronize the clock as soon as possible, disregarding all accumulated error statistics.
    Regarding time synchronization in active directory, the following articles can be referred to for more information.
    Time Synchronization in Active Directory Forests
    https://social.technet.microsoft.com/wiki/contents/articles/18573.time-synchronization-in-active-directory-forests.aspx
    How the Windows Time Service Works
    http://technet.microsoft.com/en-us/library/cc773013(v=ws.10).aspx
    W32tm
    http://technet.microsoft.com/en-us/library/bb491016.aspx
    Best regards,
    Frank Shen

  • Time Synchroniz​ation, Lookout 6.2

    We recently installed 6.2 on several new machines, and one of the machines is experiencing issues with time synchronization.  I have no time servers set up using the Time Synchronization Dialog, and the Lookout System Time (lower left corner) is unstable, and different from the Windows system clock.  The Lookout time will sometimes fall two minutes behind the windows system clock, and then "update" to the correct time and immediately start lagging behind the system clock.  Even though I have time servers set up, changing the "Sleep Time" in the Time Sync dialog affects the behavior of the lookout system time.  I've tried add the local machine as the time server, and another computer running 6.2 as the time server, but this does not correct the issue.  The lookout system time may change 2 seconds in 20 seconds, which makes all of our timers useless.  Again, we're only experiencing this issue on on computer, and I've unistalled the software, all the way down to the WinXP OS, reinstalled, and the same behavior returns after the Lookout process is opened and run for about 5 minutes. 
    It appears as though there may be a time server set somewhere that is not showing in the time sync dialog.  Is there a location in the registry where the time server might be shown?  Any other suggestions will be most appreciated.
    One last thing, once lookout is started, if I stop the NI Time Sync service, the lookout time matches the local comptuer time perfectly.  I thought about disabling this service, but Lookout won't start without it.  I have to stop it once Lookout is started,  and I have a continuous alarm alerting that the service has been stopped.
    Again, I'll appreciate any suggestions. 
    Jeff Miller
    USACE

    Hi Jeff, I am wondering if you found a solution to your issue. I have just replaced a PC running Lookout Client 6.2 (power supply died) and this machine is experiencing the same issue you describe (lookout time running wild)
    This of course, causes the hyper trends to not 'sync/display'.

  • How to reduce Oracle Cluster Time Synchronization time to 0

    Hi Guys,
    How to reduce Offset (in msec) of Oracle Cluster Time Synchronization time to 0 ???
    is there any command or is it the only solution to wait to become 0 slowly...
    [root@caslive bin]# ./crsctl check ctss
    CRS-4701: The Cluster Time Synchronization Service is in Active mode.
    CRS-4702: Offset (in msec): -1300
    regards,
    manish
    Email ID: [email protected]

    Hi,
    1.From DB02--> detail analysis menu you can take out top 50 tables & indexes. you can mark the size of the index should be generally less than the table.If its more or very much similar size of table, you can rebuild it using SE14. This can free some space.
    or else you may use brspace to do this.
    http://help.sap.com/saphelp_nw70/helpdata/EN/58/6bec38c9fa7e44b7f2163905863575/frameset.htm
    In case of table this option is risky as it may result in data loss.
    2. Earlywatch alert gives the top 20 degenrated index. you can check that which also gives a factor 'storage quality'.
    3. Run report SAP_DROP_TMPTABLES. It removes temporary database objects. ( we do this in our BW system)
    Hope this helps
    Thanks
    Sushil

  • Accessing Computers Connected to a Time Capsule From a Remote Location

    I am already able to access my Time Capsule from a Remote Location and have read/write access to the internal hard drive within the Time Capsule and the USB hard drive connected to it.
    My problem is that I cannot access any shared computers or networked hard drives attached to the Time Capsule.
    Suggestions are greatly appreciated.

    If you don't want to use Back to my Mac, you can just use screen sharing. Go into Airport Utility and go the Advanced tab along the top. Then click on port mapping. Set up a new port map to route to the iMac. When I did this, I just used the "Apple Remote Desktop" option from the drop-down menu, this pre-fills everything in for you except for the IP address of the iMac. Just pop the IP address in the field, save the new port map, and Update the TC. Now you should be able to screen share from anywhere with your MacBook Pro using the screen sharing app. The Screen Sharing app is located in /System/Library/CoreServices/ScreenSharing just drag it to the dock to keep it there. When you open it up it will ask you for a host address, just type in the IP address of your time capsule followed by the 5900 port number, for example x.x.x.x:5900 where x.x.x.x is the TC IP address.
    Just make sure your iMac is set up for File Sharing, Screen Sharing, and Remote Login, and you should be good to go. Just a word of caution, when the port map is set up, anyone can use it, so set up a good password on your iMac. Also, under the screen sharing pane, click on "Computer Settings" and check both boxes and enter a password in the box. You should not need this because when you try to connect with your MBP, it should give you an option for logging in as an authorized user, in which case just use login info for a user on the iMac.
    Just one last thing, if you close the Screen Sharing app and open terminal and enter:
    defaults write com.apple.ScreenSharing ShowBonjourBrowser_Debug 1
    then hit enter and reopen Screen Sharing, it should give you a list with all your bonjour computers and saved computers, so when you out in your IP address to connect to the iMac, make sure the box for "Add to my Computers" is checked, and it will add the IP address to the list so you don't have to put it in all the time.
    Hope this helps,
    Nathan

  • We want Cluster time synchronization service to point out time server

    Currently we are using Cluster time synchronization service in our 11gr2 RAC test system, But for production system our Admin wants the system to get its time from our time servers, he wants all the servers in the company to have same time.we can fix this by using NTP service instead of Cluster time synchronization service .But Cluster time synchronization service has more advantages over NTP.
    My Question, Is there any way that i make my Cluster time synchronization service to get time from our time servers ? In this way all my other nodes will also have same time as our time servers as they are referencing to first node, which is getting time from TIME SERVER

    Hi ,
    My Question, Is there any way that i make my Cluster time synchronization service to get time from our time servers ? In this way all my other nodes will also have same time as our time servers as they are referencing to first node, which is getting time from TIME SERVER
    This is not possible
    If you use NTP, then the Oracle Cluster Time Synchronization daemon (ctssd) starts up in observer mode.
    For CTSS to be in active mode, a vendor time service must not be running, and must not be configured (correctly or otherwise).
    This is important.
    CTSS is conservative and will switch to OBSERVER mode the moment it discovers that a vendor service is running or configured on even one node in the cluster.
    This is to prevent multiple active time sync services running on the cluster, potentially changing clocks.
    Regards,
    Levi Pereira
    <font size="1" color="red">Please close your thread when you get the solution to your problem.</font><br>
    <font size="1" color="red">Mark the replies answered "helpful" answer and/or "correct" answer that will help others with same problem.</font><br>
    <font size="1" color="red">Thanks for doing your part to make this community as valuable as possible for everyone!</font><br>

  • How to Change the Default SSH Port from Terminal ?

    How to Change the Default SSH Port from Terminal ?

    How to Change the Default SSH Port from Terminal ?
    now showing default SSH Port 22 i need change it pls help me how can do

  • How to Change the Default SSH Port from Terminal ? now showing default SSH Port 22 i need change it pls help me how can do

    How to Change the Default SSH Port from Terminal ?
    now showing default SSH Port 22 i need change it pls help me how can do

    How to Change the Default SSH Port from Terminal ?
    now showing default SSH Port 22 i need change it pls help me how can do

  • Currency Translation not working with "Time Reference from Variable"

    We have created several Currency Translations using RSCUR with a fixed "Key Date".  All have been working fine until we got the request to allow a variable date for the exchange rate date.  I have built a variable on 0DATE which I am putting a default date value into using user exit.  This default date is the SAME date as the fixed "Key Date" which we have been using.  Unfortunately when we use the "Time Reference from Variable" option and use this new variable, no currency conversion is taking place, instead it only shows the original currency values.  I am 100% sure that my variable is getting a value and it is the same date we are using for the fixed "Key Date" value so both methods should be using the exact same exchange rates.  The documentation that I can find states:
    ●      Time reference: The time reference for the currency translation can be either fixed or variable.
    If the time reference is fixed, the time at which the exchange rate is determined is independent of the data. You have the following options:
    ○       You can establish that the time reference be determined upon translation.
    ○       You can select the current date.
    ○       You can specify a fixed date as the key date.
    ○       You can specify any variable that exists for InfoObject 0DATE.
    ○       You can establish that the query key date be used. This is determined in the query settings.
    In my case I am only switching from option "You can specify a fixed date as the key date"=(Key Date) to "You can specify any variable that exists for InfoObject 0DATE"=(Time Reference from Variable).
    What am I missing?  Any help is appreciated.

    I neglected to mention that we are calling this currency translation through a WAD button using the SET_CURRENCY_TRANSLATION command.  I did do a test by applying the currency conversion within query key figure.  This seems to work.  So it appears the issue is with how the WAD is processing the variable, not the query.  When I display the variable in a drop down item within the WAD it does have the default value that I have assigned in user exit.

  • To transfer time events from external time recording system to sap r/3

    hi all,
          I have a task to make an interface program between external time recording and sap r/3, and then to transfer the time events from that external system to sap system with the help of an rfc, i have got some information like the data first has to be transferred to the table CC1TEV and then from this table the data will be uploaded to 2011 infotype with the help of a standard program, but i am unable to find a solution for making the interface program and the RFC or BAPI which will transfer the records from external system.
        if anybody has any information on this plz help me out to solve this problem.

    Which recorgding terminals using to capture time events? They should have give some guidelines about this?
    Regards
    niranjan

Maybe you are looking for