My Notepad

  • My Linux Notes
  • My Grid Notes
  • To do List
  • Monday, August 04, 2008

     

    Date, Clock and NTP

    1. date command under linux show system time;
    2. clock command show hardware clock time. ( same as hwclock cmd)
    3. System and clock time can be differernt
    4. Whenever a cold reboot happens, system time will be reset to hardware clock
    5. if you are using ntp or other equivalents align your time with time server, be aware these tools can
    only make sure your system time is aligned.
    6. You can manually sycn system time with ntp server by using:
    sudo ntpdate ntp0.oucs.ox.ac.uk ntp1.oucs.ox.ac.uk
    7. You might therefore want to use a cron job to synchronize your system time with hw clock

    e.g. add in /etc/crontab the following line:
    # sync hardware clock
    0 2 * * * root /sbin/hwclock --systohc >> /var/log/messages



    More information:

    http://www.linuxweblog.com/node/199

    Labels: , ,


    Comments: Post a Comment



    << Home

    Archives

    December 2005   January 2006   February 2006   April 2006   May 2006   June 2006   July 2006   November 2006   February 2007   May 2007   June 2007   November 2007   February 2008   March 2008   April 2008   August 2008   December 2008   March 2009   April 2009   May 2009   June 2009   October 2009   November 2009   December 2009   May 2013  

    This page is powered by Blogger. Isn't yours?