Marketplace:

 
Active-Venture.com: Cheap hosting for ecommerce and small business
Buy cheap domain registration with free domain search and forwarding services
Cheap domain registration: Register domain name and domain search services at affordable price

 

   

ntpdate

next up previous contents index

ntpdate

If you only have irregular access to the Internet then ntpdate is useful. The package provides the ntpdate command to query an NTP server and to update your clock. You can do this manually as you see fit with:



  $ ntpdate ntp.togaware.com


The advantage is that you will not have regular net transmissions as with the NTP server. This could save you up to 4MB per day. This could also be done as a cron job, for example.

For irregular access through a modem using PPP though, a good idea is to create a script file in /etc/ppp/ip-up.d called ntpdate containing:



#!/bin/sh

#invoke ntpdate to set time from system clock
if [ -x /usr/sbin/ntpdate ]; then
        /usr/sbin/ntpdate -s -t 5 ntp.togaware.com
        /sbin/hwclock --systohc
fi


Make sure the script is executable:



  # chmod a+rx /etc/ppp/ip-up.d/ntpdate


Then each time you connect the local clock will be synchronised with the NTP server.


Copyright (c) 1995-2004

 

      

Marketplace:
Facts: " Beware of bugs in the above code; I have only proved it correct, not tried it.   "  

Tuesday 22 May 2012 07:16:37 1337670997