Loading ...
Sorry, an error occurred while loading the content.

HWCLOCK

Expand Messages
  • Dean Maluski
    What is the purpose of hwclock and is it necessary to run from a cron job? I setup a cron job to synchronize my unslung slug but when hwclock runs it messes
    Message 1 of 3 , Jan 2, 2006
    • 0 Attachment
      What is the purpose of "hwclock" and is it necessary to run from a cron
      job?
      I setup a cron job to synchronize my unslung slug but when hwclock runs
      it messes up the time.
      I use slug and oww package to monitor weather. Every 5 minutes it
      uploads wx stats to my main server. Trouble is when hwclock runs it
      rolls the clock out to some bogus time which stops my cron jobs from
      running at their proper time.
      Seems I have two choices;
      1.) Let hwclock set the time incorrectly.
      2.) rem out hwclock and re-enable my timesinc script which keeps time
      correct.
      My question is, is hwclock necessary?
    • Adam Baker
      ... The purpose is to correct the OS timestamp which as configured by Linksys does not keep very good time from the real time clock chip which manages slightly
      Message 2 of 3 , Jan 2, 2006
      • 0 Attachment
        Dean Maluski <dmaluski@...> writes:

        >
        > What is the purpose of "hwclock" and is it necessary to run from a cron
        > job?

        The purpose is to correct the OS timestamp which as configured by Linksys does
        not keep very good time from the real time clock chip which manages slightly
        better. If you have a beter source of time then I would suggest changing the
        cron job so that instead of setting the OS clock from the real time clock it
        does the opposite and sets the real time clock chip from the OS clock (i.e.
        change the command to /usr/sbin/hwclock --systohc &>/dev/null).

        You may also want to install the ntp package even if you don't use NTP so that
        you can use the tickadj command to correct the drift that Linksys have
        configured - see the NTP page on the wiki when it comes back online.
      • Thomas Cooper
        ... hwclock is nothing more than the program that is used to set the hardware clock to the same time as the operating system time or to set the operating
        Message 3 of 3 , Jan 2, 2006
        • 0 Attachment
          On 1/2/06, Dean Maluski <dmaluski@...> wrote:
          What is the purpose of "hwclock" and is it necessary to run from a cron
          job?
          I setup a cron job to synchronize my unslung slug but when hwclock runs
          it messes up the time.
          I use slug and oww package to monitor weather. Every 5 minutes it
          uploads wx stats to my main server. Trouble is when hwclock runs it
          rolls the clock out to some bogus time which stops my cron jobs from
          running at their proper time.
          Seems I have two choices;
          1.) Let hwclock set the time incorrectly.
          2.) rem out hwclock and re-enable my timesinc script which keeps time
          correct.
          My question is, is hwclock necessary?
          hwclock is nothing more than the program that is used to set the hardware clock to the same time as the operating system time or to set the operating system time the same as the hardware clock (you have obviously observed this one).
           
          If you set the hardware clock to the correct time, then when cron runs hwclock, things will work ok.
           
          If you install one of the network time packages, you should definately remove hwclock from crontab.
           

           

        Your message has been successfully submitted and would be delivered to recipients shortly.