Terminal Command to Synchronize System Clock?

Discussion in 'macOS' started by Dadioh, Jan 19, 2011.

  1. Dadioh macrumors 65816

    Dadioh

    Joined:
    Feb 3, 2010
    Location:
    Canada Eh?
    #1
    I have a Mac Pro 2006 and I am able to overclock the system successfully using ZDNET Clock Tool. However, since the Mac runs its system clock off the front side bus the system clock ends up running fast by 15%. If I open date and time preferences the system will resynch with time.apple.com but I don' want to have to manually do this. I was hoping there was a command line that achieves the same thing and then the command line could be setup in a script that runs every 5 minutes or so.

    Anyone know if this can be achieved?

    Thanks
     
  2. phreebsd macrumors regular

    Joined:
    Aug 6, 2010
  3. soromak macrumors newbie

    Joined:
    Apr 15, 2010
    #3
    I would rather suggest 'man ntpdate'
    Basically you just do 'ntpdate ntp.server.name.com*' eg. time.euro.apple.com
     
  4. Dadioh thread starter macrumors 65816

    Dadioh

    Joined:
    Feb 3, 2010
    Location:
    Canada Eh?
    #4
    Thanks. Tried it and get the following. First try without superuser fails permission. Second try running it with su gets a "sorry"? Using sudo su to turn on superuser then gets NTP Socket in use.

    Mac-Pro:~ macbook24$ ntpdate time.apple.com
    19 Jan 15:42:21 ntpdate[325]: bind() fails: Permission denied
    Mac-Pro:~ macbook24$ su ntpdate time.apple.com
    Password:
    su: Sorry
    Mac-Pro:~ macbook24$ sudo su
    sh-3.2# ntpdate time.apple.com
    19 Jan 15:42:54 ntpdate[329]: the NTP socket is in use, exiting
    sh-3.2#



    edit: looks like I need to run it as root....
    from man ntpupdate

    The ntpdate utility sets the local date and time by polling the Network
    Time Protocol (NTP) server(s) given as the server arguments to determine
    the correct time. It must be run as root on the local host.
     
  5. Dadioh thread starter macrumors 65816

    Dadioh

    Joined:
    Feb 3, 2010
    Location:
    Canada Eh?
    #5
    Unless I'm reading the manual wrong this requires me to enter the correct date and time manually?
     

Share This Page