Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Windows vs Linux time of day [modified]

Windows vs Linux time of day [modified]

Scheduled Pinned Locked Moved The Lounge
cssvisual-studiosysadminlinuxhardware
32 Posts 11 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N normanS

    I have a network containing Linux (RedHat 8) and Windows XP PCs. While I was logging network events simultaneously on Windows and Linux machines, I noticed that the logged times drifted out of synchronisation over the course of a day, then one (by logging on another PC I discovered it was the Linux machine) jumped by about 10 seconds back towards synchronisation at 4 am the next morning. As far as I can tell, Linux (RH8 in a standard install) updates the system clock (time of day) from the motherboard real time clock once a day, while Windows XP does it much more often. How often does Windows XP update the system clock from motherboard RTC? -- modified at 6:12 Tuesday 23rd May, 2006 OK, from initial answers, I need to be more specific! These PCs are destined to run stand-alone, with occasional (daily, maybe) synchronisation via a custom radio system. But we want to be able to synchronise events logged on the various PCs to within a few 100 milliseconds, using the system times from the individual PCs. I had the PCs on a network (but NOT using NTP) so I could see how good synchronisation using individual PC system times would be. In the final system, there will be no network connection between the machines. My observation (using the network and logging times of specific messages on the network) was that for XP PCs, the system times on different PCs drift by less than 100 milliseconds per hour. My guess is that XP updates its system clock from motherboard real time clock regularly (every second, maybe.) In contrast, RedHat Linux PC system clocks drift rapidly compared to the WinXP clocks (up to 0.5 seconds per hour), and then they jump back close to synchronisation at 4:01 am every morning. This would appear to be because Linux only resets system time according to hardware clock once a day. (CRON.DAILY must have something to do with it!) I will probably update the Linux system clock to RTC value more often - say every minute or every 5 minutes - by adding a task using crontab, but I was trying to find out how often XP does this update. Or maybe XP always uses the RTC.

    B Offline
    B Offline
    BlisteringSh33p
    wrote on last edited by
    #5

    normanS wrote:

    How often does Windows XP update the system clock from RTC?

    AFAIK, WinXP doesn't ever update the system clock from the RTC. If you have a Windows domain server, the WinXP boxes may very well be synchronized to that (I don't know the frequency or accuracy). If you have enabled Internet Time and set a server to get time from (it defaults to time.windows.com), then it will sync to that time source once a week. If you need to have the time synchronized between the machines on your network, and you also want it synchronized accurately, you can use NTP. It's really not very difficult to set up and administer under any Linux (though by the volumes of documentation for it would make seem that it is). An alternative for Windows is Automachron (http://oneguycoding.com/). It supports both the TIME protocol and various versions of SNTP, with configurable synchronization intervals. On my network, I have one Linux box that syncs to external NTP servers, and everything else syncs to it (other Linux and Solaris boxes via NTP and WinXP boxes via Automachron).

    N 1 Reply Last reply
    0
    • N normanS

      I have a network containing Linux (RedHat 8) and Windows XP PCs. While I was logging network events simultaneously on Windows and Linux machines, I noticed that the logged times drifted out of synchronisation over the course of a day, then one (by logging on another PC I discovered it was the Linux machine) jumped by about 10 seconds back towards synchronisation at 4 am the next morning. As far as I can tell, Linux (RH8 in a standard install) updates the system clock (time of day) from the motherboard real time clock once a day, while Windows XP does it much more often. How often does Windows XP update the system clock from motherboard RTC? -- modified at 6:12 Tuesday 23rd May, 2006 OK, from initial answers, I need to be more specific! These PCs are destined to run stand-alone, with occasional (daily, maybe) synchronisation via a custom radio system. But we want to be able to synchronise events logged on the various PCs to within a few 100 milliseconds, using the system times from the individual PCs. I had the PCs on a network (but NOT using NTP) so I could see how good synchronisation using individual PC system times would be. In the final system, there will be no network connection between the machines. My observation (using the network and logging times of specific messages on the network) was that for XP PCs, the system times on different PCs drift by less than 100 milliseconds per hour. My guess is that XP updates its system clock from motherboard real time clock regularly (every second, maybe.) In contrast, RedHat Linux PC system clocks drift rapidly compared to the WinXP clocks (up to 0.5 seconds per hour), and then they jump back close to synchronisation at 4:01 am every morning. This would appear to be because Linux only resets system time according to hardware clock once a day. (CRON.DAILY must have something to do with it!) I will probably update the Linux system clock to RTC value more often - say every minute or every 5 minutes - by adding a task using crontab, but I was trying to find out how often XP does this update. Or maybe XP always uses the RTC.

      C Offline
      C Offline
      code frog 0
      wrote on last edited by
      #6

      Here's your boy. This is a good guide I think. I've used it several times. http://tf.nist.gov/service/pdf/win2000xp.pdf[^] Type this on the command line "net time /?" don't use the quotes though and hit enter.


      If we all used the Plain English compiler every post in the lounge would be a programming question.:cool: Welcome to CP in your language. Post the unicode version in My CP Blog [ ^ ] now. People who don't understand how awesome Firefox is have never used CPhog. The act of using CPhog alone doesn't make Firefox cool. It opens your eyes to the possibilities and then you start looking for other things like CPhog and your eyes are suddenly open to all sorts of useful things all through Firefox. - (Self Quote)

      N 1 Reply Last reply
      0
      • N normanS

        I have a network containing Linux (RedHat 8) and Windows XP PCs. While I was logging network events simultaneously on Windows and Linux machines, I noticed that the logged times drifted out of synchronisation over the course of a day, then one (by logging on another PC I discovered it was the Linux machine) jumped by about 10 seconds back towards synchronisation at 4 am the next morning. As far as I can tell, Linux (RH8 in a standard install) updates the system clock (time of day) from the motherboard real time clock once a day, while Windows XP does it much more often. How often does Windows XP update the system clock from motherboard RTC? -- modified at 6:12 Tuesday 23rd May, 2006 OK, from initial answers, I need to be more specific! These PCs are destined to run stand-alone, with occasional (daily, maybe) synchronisation via a custom radio system. But we want to be able to synchronise events logged on the various PCs to within a few 100 milliseconds, using the system times from the individual PCs. I had the PCs on a network (but NOT using NTP) so I could see how good synchronisation using individual PC system times would be. In the final system, there will be no network connection between the machines. My observation (using the network and logging times of specific messages on the network) was that for XP PCs, the system times on different PCs drift by less than 100 milliseconds per hour. My guess is that XP updates its system clock from motherboard real time clock regularly (every second, maybe.) In contrast, RedHat Linux PC system clocks drift rapidly compared to the WinXP clocks (up to 0.5 seconds per hour), and then they jump back close to synchronisation at 4:01 am every morning. This would appear to be because Linux only resets system time according to hardware clock once a day. (CRON.DAILY must have something to do with it!) I will probably update the Linux system clock to RTC value more often - say every minute or every 5 minutes - by adding a task using crontab, but I was trying to find out how often XP does this update. Or maybe XP always uses the RTC.

        H Offline
        H Offline
        hairy_hats
        wrote on last edited by
        #7

        I dual boot Linux and XP, and XP is currently displaying an hour earlier than Linux thanks to them fighting over British Summer Time! :rolleyes:

        1 Reply Last reply
        0
        • M Maxwell Chen

          normanS wrote:

          Windows XP update the system clock

          1. Windows XP can be scheduled to update the system time via NTP (if not behind a firewall, or the firewall allows, or the domain policy not disabling it). 2) Windows 2000 (workstations) sync the time with the domain controller (PDC) when the OS starts up. Not sure WinXP provides the same feature or not.

          Maxwell Chen

          N Offline
          N Offline
          normanS
          wrote on last edited by
          #8

          NTP is not appropriate - the final PCs will be stand-alone, with daily synchronisation. I want to be able to synchronise events occuring during the day, using system times of individual PCs. I have updated my original post, if you have time, please have a look at that again. Thanks.

          1 Reply Last reply
          0
          • C code frog 0

            Here's your boy. This is a good guide I think. I've used it several times. http://tf.nist.gov/service/pdf/win2000xp.pdf[^] Type this on the command line "net time /?" don't use the quotes though and hit enter.


            If we all used the Plain English compiler every post in the lounge would be a programming question.:cool: Welcome to CP in your language. Post the unicode version in My CP Blog [ ^ ] now. People who don't understand how awesome Firefox is have never used CPhog. The act of using CPhog alone doesn't make Firefox cool. It opens your eyes to the possibilities and then you start looking for other things like CPhog and your eyes are suddenly open to all sorts of useful things all through Firefox. - (Self Quote)

            N Offline
            N Offline
            normanS
            wrote on last edited by
            #9

            Thanks Rex Unfortunately, NTP is not appropriate - the final PCs will be stand-alone, with daily synchronisation. I want to be able to synchronise events occuring during the day, using system times of individual PCs. I have updated my original post, if you have time, please have a look at that again.

            1 Reply Last reply
            0
            • B BlisteringSh33p

              normanS wrote:

              How often does Windows XP update the system clock from RTC?

              AFAIK, WinXP doesn't ever update the system clock from the RTC. If you have a Windows domain server, the WinXP boxes may very well be synchronized to that (I don't know the frequency or accuracy). If you have enabled Internet Time and set a server to get time from (it defaults to time.windows.com), then it will sync to that time source once a week. If you need to have the time synchronized between the machines on your network, and you also want it synchronized accurately, you can use NTP. It's really not very difficult to set up and administer under any Linux (though by the volumes of documentation for it would make seem that it is). An alternative for Windows is Automachron (http://oneguycoding.com/). It supports both the TIME protocol and various versions of SNTP, with configurable synchronization intervals. On my network, I have one Linux box that syncs to external NTP servers, and everything else syncs to it (other Linux and Solaris boxes via NTP and WinXP boxes via Automachron).

              N Offline
              N Offline
              normanS
              wrote on last edited by
              #10

              Looking at the consistency of times on various Windows PCs, I believe Windows must be updating its (software) system clock using the real time clock on the motherboard. My final system will not have any network connection between the PCs, and no connection to internet, otherwise life would be easy! I have updated my original post, if you have time, please have a look at that again. Thanks.

              1 Reply Last reply
              0
              • G Glenn Dawson

                The Date and Time dialog for Windows XP Pro claims: time was synchronized on 5/17 and will be synchronized again on 5/24. So, it looks to be one week.

                N Offline
                N Offline
                normanS
                wrote on last edited by
                #11

                Interesting - you must have something enabled which I don't. I have nothing in date/time dialog about synchronising. In any case, my final PC setup will be stand-alone, no network, no internet, with daily synchronisation. I want to be able to synchronise events occuring during the day, using system times of individual PCs. I have updated my original post, if you have time, please have a look at that again. Thanks.

                1 Reply Last reply
                0
                • N normanS

                  I have a network containing Linux (RedHat 8) and Windows XP PCs. While I was logging network events simultaneously on Windows and Linux machines, I noticed that the logged times drifted out of synchronisation over the course of a day, then one (by logging on another PC I discovered it was the Linux machine) jumped by about 10 seconds back towards synchronisation at 4 am the next morning. As far as I can tell, Linux (RH8 in a standard install) updates the system clock (time of day) from the motherboard real time clock once a day, while Windows XP does it much more often. How often does Windows XP update the system clock from motherboard RTC? -- modified at 6:12 Tuesday 23rd May, 2006 OK, from initial answers, I need to be more specific! These PCs are destined to run stand-alone, with occasional (daily, maybe) synchronisation via a custom radio system. But we want to be able to synchronise events logged on the various PCs to within a few 100 milliseconds, using the system times from the individual PCs. I had the PCs on a network (but NOT using NTP) so I could see how good synchronisation using individual PC system times would be. In the final system, there will be no network connection between the machines. My observation (using the network and logging times of specific messages on the network) was that for XP PCs, the system times on different PCs drift by less than 100 milliseconds per hour. My guess is that XP updates its system clock from motherboard real time clock regularly (every second, maybe.) In contrast, RedHat Linux PC system clocks drift rapidly compared to the WinXP clocks (up to 0.5 seconds per hour), and then they jump back close to synchronisation at 4:01 am every morning. This would appear to be because Linux only resets system time according to hardware clock once a day. (CRON.DAILY must have something to do with it!) I will probably update the Linux system clock to RTC value more often - say every minute or every 5 minutes - by adding a task using crontab, but I was trying to find out how often XP does this update. Or maybe XP always uses the RTC.

                  M Offline
                  M Offline
                  Mike Dimmick
                  wrote on last edited by
                  #12

                  My understanding is that both systems update the 'real time' clock time using one of many hardware sources. They may or may not actually access the hardware real-time clock. I believe Windows XP installed on an ACPI-capable machine will use an ACPI feature for running the 'real time' clock timer. The choice of which method and sources to use is up to the HAL (Hardware Abstraction Layer). Linux can use one of three different methods (depending on kernel version). I read an article[^] recently discussing this - it's actually an MS KB article about running Linux virtual machines on Virtual Server 2005 R2. Changing the method you're using may correct this clock drift problem. Stability. What an interesting concept. -- Chris Maunder

                  N 1 Reply Last reply
                  0
                  • M Mike Dimmick

                    My understanding is that both systems update the 'real time' clock time using one of many hardware sources. They may or may not actually access the hardware real-time clock. I believe Windows XP installed on an ACPI-capable machine will use an ACPI feature for running the 'real time' clock timer. The choice of which method and sources to use is up to the HAL (Hardware Abstraction Layer). Linux can use one of three different methods (depending on kernel version). I read an article[^] recently discussing this - it's actually an MS KB article about running Linux virtual machines on Virtual Server 2005 R2. Changing the method you're using may correct this clock drift problem. Stability. What an interesting concept. -- Chris Maunder

                    N Offline
                    N Offline
                    normanS
                    wrote on last edited by
                    #13

                    Hmmmm. That's a scary MS article. I'm on kernel 2.4. My PC is a P4 2.6GHz (??), 512Meg RAM, and all I am running is Ethereal. And it's on hardware, not a virtual machine. At least I'm not getting the 10% gains they suggest is possible in a Virtual machine. I'm doing the same test on other very similar hardware to see what the results are (except I'm using TCPDUMP instead of Ethereal on the Linux PC.) I will probably try syncing the system clock to RTC every 5 minutes via CRONTAB - nothing like a brute force approach!

                    1 Reply Last reply
                    0
                    • N normanS

                      I have a network containing Linux (RedHat 8) and Windows XP PCs. While I was logging network events simultaneously on Windows and Linux machines, I noticed that the logged times drifted out of synchronisation over the course of a day, then one (by logging on another PC I discovered it was the Linux machine) jumped by about 10 seconds back towards synchronisation at 4 am the next morning. As far as I can tell, Linux (RH8 in a standard install) updates the system clock (time of day) from the motherboard real time clock once a day, while Windows XP does it much more often. How often does Windows XP update the system clock from motherboard RTC? -- modified at 6:12 Tuesday 23rd May, 2006 OK, from initial answers, I need to be more specific! These PCs are destined to run stand-alone, with occasional (daily, maybe) synchronisation via a custom radio system. But we want to be able to synchronise events logged on the various PCs to within a few 100 milliseconds, using the system times from the individual PCs. I had the PCs on a network (but NOT using NTP) so I could see how good synchronisation using individual PC system times would be. In the final system, there will be no network connection between the machines. My observation (using the network and logging times of specific messages on the network) was that for XP PCs, the system times on different PCs drift by less than 100 milliseconds per hour. My guess is that XP updates its system clock from motherboard real time clock regularly (every second, maybe.) In contrast, RedHat Linux PC system clocks drift rapidly compared to the WinXP clocks (up to 0.5 seconds per hour), and then they jump back close to synchronisation at 4:01 am every morning. This would appear to be because Linux only resets system time according to hardware clock once a day. (CRON.DAILY must have something to do with it!) I will probably update the Linux system clock to RTC value more often - say every minute or every 5 minutes - by adding a task using crontab, but I was trying to find out how often XP does this update. Or maybe XP always uses the RTC.

                      R Offline
                      R Offline
                      RonMcK3
                      wrote on last edited by
                      #14

                      Rather than relying on the WinXP's time features, I use a program, NISTime.exe, downloaded from NIST Boulder. If your separate PCs have an internet connection you can have them sync with a time server as often as once per hour. Norman, here are the time difference entries in my log for the past 24 hours for my Dell 2350; as you can see some of the hourly differences are under 100 milliseconds but some are 3, 4 and 5 times 100 milliseconds, and the cumulative drift during the 24 hour period is -0.232 seconds net ---Date--- --Time-- Difference (Sec) Year Mo Da Hr Mn Sc Incre. Cumul. 2006 05 23 00 25 13 0.144 0.144 2006 05 23 01 25 13 0.176 0.320 2006 05 23 02 25 15 -0.252 0.068 2006 05 23 03 25 17 -0.080 -0.012 2006 05 23 04 25 18 -0.235 -0.247 2006 05 23 05 25 20 0.213 -0.034 2006 05 23 06 25 22 0.146 0.112 2006 05 23 07 25 24 0.080 0.192 2006 05 23 08 25 24 0.160 0.352 2006 05 23 09 25 26 -0.224 0.128 2006 05 23 10 25 28 -0.138 -0.010 2006 05 23 11 25 29 -0.311 -0.321 2006 05 23 12 25 31 -0.032 -0.353 2006 05 23 13 25 31 -0.049 -0.402 2006 05 23 14 25 31 -0.110 -0.512 2006 05 23 15 25 33 0.039 -0.473 2006 05 23 16 25 33 0.058 -0.415 2006 05 23 17 25 34 0.081 -0.334 2006 05 23 18 25 34 0.116 -0.218 2006 05 23 19 25 36 -0.058 -0.276 2006 05 23 20 25 36 -0.123 -0.399 2006 05 23 21 25 38 0.129 -0.270 2006 05 23 22 25 40 0.093 -0.177 2006 05 23 23 25 41 0.153 -0.024 2006 05 24 00 25 43 -0.208 -0.232 HTH -- Ron McK4, Inc. Orlando, FL

                      N 1 Reply Last reply
                      0
                      • R RonMcK3

                        Rather than relying on the WinXP's time features, I use a program, NISTime.exe, downloaded from NIST Boulder. If your separate PCs have an internet connection you can have them sync with a time server as often as once per hour. Norman, here are the time difference entries in my log for the past 24 hours for my Dell 2350; as you can see some of the hourly differences are under 100 milliseconds but some are 3, 4 and 5 times 100 milliseconds, and the cumulative drift during the 24 hour period is -0.232 seconds net ---Date--- --Time-- Difference (Sec) Year Mo Da Hr Mn Sc Incre. Cumul. 2006 05 23 00 25 13 0.144 0.144 2006 05 23 01 25 13 0.176 0.320 2006 05 23 02 25 15 -0.252 0.068 2006 05 23 03 25 17 -0.080 -0.012 2006 05 23 04 25 18 -0.235 -0.247 2006 05 23 05 25 20 0.213 -0.034 2006 05 23 06 25 22 0.146 0.112 2006 05 23 07 25 24 0.080 0.192 2006 05 23 08 25 24 0.160 0.352 2006 05 23 09 25 26 -0.224 0.128 2006 05 23 10 25 28 -0.138 -0.010 2006 05 23 11 25 29 -0.311 -0.321 2006 05 23 12 25 31 -0.032 -0.353 2006 05 23 13 25 31 -0.049 -0.402 2006 05 23 14 25 31 -0.110 -0.512 2006 05 23 15 25 33 0.039 -0.473 2006 05 23 16 25 33 0.058 -0.415 2006 05 23 17 25 34 0.081 -0.334 2006 05 23 18 25 34 0.116 -0.218 2006 05 23 19 25 36 -0.058 -0.276 2006 05 23 20 25 36 -0.123 -0.399 2006 05 23 21 25 38 0.129 -0.270 2006 05 23 22 25 40 0.093 -0.177 2006 05 23 23 25 41 0.153 -0.024 2006 05 24 00 25 43 -0.208 -0.232 HTH -- Ron McK4, Inc. Orlando, FL

                        N Offline
                        N Offline
                        normanS
                        wrote on last edited by
                        #15

                        Thanks - Unfortunately, the final computer arrangement will have no network and no internet. Synchronisation will be done once occasionally once per hour or once per day, via a radio network. How often we have to synchronise them depends on how well we can get the different PCs to keep time in stand-alone. The synchronisation on Win XP machines is pretty good (typically a relative drift of well under 100 milliseconds per hour.) My problem is a Linux PC, which drifts 500 milliseconds per hour. I am going to try updating its system clock from hardware clock every 5 minutes.

                        S 1 Reply Last reply
                        0
                        • N normanS

                          I have a network containing Linux (RedHat 8) and Windows XP PCs. While I was logging network events simultaneously on Windows and Linux machines, I noticed that the logged times drifted out of synchronisation over the course of a day, then one (by logging on another PC I discovered it was the Linux machine) jumped by about 10 seconds back towards synchronisation at 4 am the next morning. As far as I can tell, Linux (RH8 in a standard install) updates the system clock (time of day) from the motherboard real time clock once a day, while Windows XP does it much more often. How often does Windows XP update the system clock from motherboard RTC? -- modified at 6:12 Tuesday 23rd May, 2006 OK, from initial answers, I need to be more specific! These PCs are destined to run stand-alone, with occasional (daily, maybe) synchronisation via a custom radio system. But we want to be able to synchronise events logged on the various PCs to within a few 100 milliseconds, using the system times from the individual PCs. I had the PCs on a network (but NOT using NTP) so I could see how good synchronisation using individual PC system times would be. In the final system, there will be no network connection between the machines. My observation (using the network and logging times of specific messages on the network) was that for XP PCs, the system times on different PCs drift by less than 100 milliseconds per hour. My guess is that XP updates its system clock from motherboard real time clock regularly (every second, maybe.) In contrast, RedHat Linux PC system clocks drift rapidly compared to the WinXP clocks (up to 0.5 seconds per hour), and then they jump back close to synchronisation at 4:01 am every morning. This would appear to be because Linux only resets system time according to hardware clock once a day. (CRON.DAILY must have something to do with it!) I will probably update the Linux system clock to RTC value more often - say every minute or every 5 minutes - by adding a task using crontab, but I was trying to find out how often XP does this update. Or maybe XP always uses the RTC.

                          P Offline
                          P Offline
                          Paul Horstink
                          wrote on last edited by
                          #16

                          IMO without NTP you're basically out of luck, since in my experience most PC's RTC are not exactly accurate, and would drift seconds, if not minutes in a day. I don't think you will be able to keep stand-alone PCs in sync within your required limits. Your best option may be though to go for some kind of GPS-based system. There are dedicated GPS-based time-servers which you could connect to each of these PC, or another (probably cheaper) option could be Bluetotth-based GPS-receivers (such as from Holux, Garmin, Tomtom etc.) Then all you need is some utility that will take the time from the Bluetooth-GPS device and sync the PC regularly (may be included, or can be found as shareware). Accuracy of this is excelent! Good luck, Paul

                          N 1 Reply Last reply
                          0
                          • N normanS

                            Thanks - Unfortunately, the final computer arrangement will have no network and no internet. Synchronisation will be done once occasionally once per hour or once per day, via a radio network. How often we have to synchronise them depends on how well we can get the different PCs to keep time in stand-alone. The synchronisation on Win XP machines is pretty good (typically a relative drift of well under 100 milliseconds per hour.) My problem is a Linux PC, which drifts 500 milliseconds per hour. I am going to try updating its system clock from hardware clock every 5 minutes.

                            S Offline
                            S Offline
                            S Douglas
                            wrote on last edited by
                            #17

                            normanS wrote:

                            My problem is a Linux PC, which drifts 500 milliseconds per hour.

                            When was the system board battery last replaced? The only times I have see a clock vary that much was when the battery was dead.

                            normanS wrote:

                            How often we have to synchronise them depends on how well we can get the different PCs to keep time in stand-alone.

                            Why not have all the local systems sync with one system and that system sync with the radio network? That way you have have less calls for time going out over the radio network.


                            I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:

                            N 1 Reply Last reply
                            0
                            • S S Douglas

                              normanS wrote:

                              My problem is a Linux PC, which drifts 500 milliseconds per hour.

                              When was the system board battery last replaced? The only times I have see a clock vary that much was when the battery was dead.

                              normanS wrote:

                              How often we have to synchronise them depends on how well we can get the different PCs to keep time in stand-alone.

                              Why not have all the local systems sync with one system and that system sync with the radio network? That way you have have less calls for time going out over the radio network.


                              I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:

                              N Offline
                              N Offline
                              normanS
                              wrote on last edited by
                              #18

                              Could be the battery, but as far as I can see, my Linux systems drift wildly (3 PCs each loose 250 to 800 milliseconds per hour) while 7 similar Windows XP systems drift less than 50 milliseconds per hour. Co-incidence? Basically, it will operate as you suggest - one system will get the master time signal (daily, maybe), and it will synchronise the others via radio (hourly, maybe.) If the separate PC system clocks drift at maximum 50 mS per hour relative to my arbitrary master, this will be "good enough" (100 mSec synchronisation error.) This is what the Windows PCs do at the moment. What I have to do is get the Linux PC system clocks to drift at the Windows XP rate. I am working on that now. -- modified at 5:24 Wednesday 24th May, 2006

                              S 1 Reply Last reply
                              0
                              • P Paul Horstink

                                IMO without NTP you're basically out of luck, since in my experience most PC's RTC are not exactly accurate, and would drift seconds, if not minutes in a day. I don't think you will be able to keep stand-alone PCs in sync within your required limits. Your best option may be though to go for some kind of GPS-based system. There are dedicated GPS-based time-servers which you could connect to each of these PC, or another (probably cheaper) option could be Bluetotth-based GPS-receivers (such as from Holux, Garmin, Tomtom etc.) Then all you need is some utility that will take the time from the Bluetooth-GPS device and sync the PC regularly (may be included, or can be found as shareware). Accuracy of this is excelent! Good luck, Paul

                                N Offline
                                N Offline
                                normanS
                                wrote on last edited by
                                #19

                                The system clocks on the WinXP PCs I have checked (7 of them) all drift around 1 second per day. I can live with that, by synchronising the PCs with each other every hour or two. The system clocks on the RedHat8 Linux PCs I have checked (3 of them, same make & model as the Win XP PCs) drift from 4 to 20 seconds per day, but they jump back into synchronisation (or close) at 4:01 every morning. From what I have read, this appears to be because Linux only resets its system clock according to the PC hardware clock once a day by default. What I plan to do is force Linux to reset its system clock according to PC hardware clock every 5 minutes. I am working on that now. As for using GPS, you are absolutely correct. We are using handheld GPS receivers for primary timekeeping, but the systems are mobile, and GPS is useless in a garage, not-so-great in high-rise cities, etc. The synchronisation I am looking at is basically for backup timekeeping.

                                1 Reply Last reply
                                0
                                • N normanS

                                  Could be the battery, but as far as I can see, my Linux systems drift wildly (3 PCs each loose 250 to 800 milliseconds per hour) while 7 similar Windows XP systems drift less than 50 milliseconds per hour. Co-incidence? Basically, it will operate as you suggest - one system will get the master time signal (daily, maybe), and it will synchronise the others via radio (hourly, maybe.) If the separate PC system clocks drift at maximum 50 mS per hour relative to my arbitrary master, this will be "good enough" (100 mSec synchronisation error.) This is what the Windows PCs do at the moment. What I have to do is get the Linux PC system clocks to drift at the Windows XP rate. I am working on that now. -- modified at 5:24 Wednesday 24th May, 2006

                                  S Offline
                                  S Offline
                                  S Douglas
                                  wrote on last edited by
                                  #20

                                  normanS wrote:

                                  my Linux systems drift wildly

                                  I have heard that if you threaten a Windows box with an install CD of *Nix it behaves its self. I wonder if the opposite is true? :) What may I ask are you doing that requires such precision in time keeping?


                                  I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:

                                  N 1 Reply Last reply
                                  0
                                  • N normanS

                                    I have a network containing Linux (RedHat 8) and Windows XP PCs. While I was logging network events simultaneously on Windows and Linux machines, I noticed that the logged times drifted out of synchronisation over the course of a day, then one (by logging on another PC I discovered it was the Linux machine) jumped by about 10 seconds back towards synchronisation at 4 am the next morning. As far as I can tell, Linux (RH8 in a standard install) updates the system clock (time of day) from the motherboard real time clock once a day, while Windows XP does it much more often. How often does Windows XP update the system clock from motherboard RTC? -- modified at 6:12 Tuesday 23rd May, 2006 OK, from initial answers, I need to be more specific! These PCs are destined to run stand-alone, with occasional (daily, maybe) synchronisation via a custom radio system. But we want to be able to synchronise events logged on the various PCs to within a few 100 milliseconds, using the system times from the individual PCs. I had the PCs on a network (but NOT using NTP) so I could see how good synchronisation using individual PC system times would be. In the final system, there will be no network connection between the machines. My observation (using the network and logging times of specific messages on the network) was that for XP PCs, the system times on different PCs drift by less than 100 milliseconds per hour. My guess is that XP updates its system clock from motherboard real time clock regularly (every second, maybe.) In contrast, RedHat Linux PC system clocks drift rapidly compared to the WinXP clocks (up to 0.5 seconds per hour), and then they jump back close to synchronisation at 4:01 am every morning. This would appear to be because Linux only resets system time according to hardware clock once a day. (CRON.DAILY must have something to do with it!) I will probably update the Linux system clock to RTC value more often - say every minute or every 5 minutes - by adding a task using crontab, but I was trying to find out how often XP does this update. Or maybe XP always uses the RTC.

                                    L Offline
                                    L Offline
                                    Lenny D
                                    wrote on last edited by
                                    #21

                                    Hello, I have had to reset a few Linux (and Solaris) time-of-day clocks over the years, and have learned a few things about how PCs keep and maintain the time. Real-Time Clocks -- in a typical PC, the RTC hardware uses a low-frequency crystal (about 32 kilohertz) as it's time base. These crystals tend to be inexpensive, so their initial accuracy is not very good. Further, the frequency can drift with temperature and voltage changes. As far as I know, most operating systems only use the RTC to get an initial estimate of the time-of-day at boot-up. After that, they rely on other means to keep their time-of-day value close to actual time. A decent write-up on these PC RTC circuits can be found at http://www.beaglesoft.com/mainfaqclock.htm XP Time Synchronization -- if your PC clocks are staying synch'd to within 100 milliseconds, then those PCs are syncing their clocks to a master clock. It is very unlikely that they are staying in-sync using just their RTC hardware. Linux Time Synchronization -- when the Linux OS boots, it reads the hardware clock once, to initially set its time-of-day clock. (The command is "hwclock --hctosys", in recent Linux distributions.) After that, the Linux kernel maintains the time-of-day value that it uses. There are multiple ways available to maintain that value (e.g. NTP; GPS hardware; scripts that contact some other type of time server; etc). For stand-alone machines, the typical way is to run a program called "adjtimex". With this, you periodically set the kernel time-of-day value with the correct time (like, for example, using NTP while connected to a network during development). The 'adjtimex' program is told about these updates, and measures the systematic drift between the real time, and the hardware clock time. Once it has a good measurement, you can take the PC off the LAN, and re-configure it to use 'adjtimex' to adjust the kernel's time-of-day value to account for this measured drift. Naturally, if you are still sync'ing the time, but at a longer interval, you can use 'adjtimex' in-between the actual clock syncs, to maintain a more-or-less accurate time while running stand-alone.

                                    N 1 Reply Last reply
                                    0
                                    • L Lenny D

                                      Hello, I have had to reset a few Linux (and Solaris) time-of-day clocks over the years, and have learned a few things about how PCs keep and maintain the time. Real-Time Clocks -- in a typical PC, the RTC hardware uses a low-frequency crystal (about 32 kilohertz) as it's time base. These crystals tend to be inexpensive, so their initial accuracy is not very good. Further, the frequency can drift with temperature and voltage changes. As far as I know, most operating systems only use the RTC to get an initial estimate of the time-of-day at boot-up. After that, they rely on other means to keep their time-of-day value close to actual time. A decent write-up on these PC RTC circuits can be found at http://www.beaglesoft.com/mainfaqclock.htm XP Time Synchronization -- if your PC clocks are staying synch'd to within 100 milliseconds, then those PCs are syncing their clocks to a master clock. It is very unlikely that they are staying in-sync using just their RTC hardware. Linux Time Synchronization -- when the Linux OS boots, it reads the hardware clock once, to initially set its time-of-day clock. (The command is "hwclock --hctosys", in recent Linux distributions.) After that, the Linux kernel maintains the time-of-day value that it uses. There are multiple ways available to maintain that value (e.g. NTP; GPS hardware; scripts that contact some other type of time server; etc). For stand-alone machines, the typical way is to run a program called "adjtimex". With this, you periodically set the kernel time-of-day value with the correct time (like, for example, using NTP while connected to a network during development). The 'adjtimex' program is told about these updates, and measures the systematic drift between the real time, and the hardware clock time. Once it has a good measurement, you can take the PC off the LAN, and re-configure it to use 'adjtimex' to adjust the kernel's time-of-day value to account for this measured drift. Naturally, if you are still sync'ing the time, but at a longer interval, you can use 'adjtimex' in-between the actual clock syncs, to maintain a more-or-less accurate time while running stand-alone.

                                      N Offline
                                      N Offline
                                      normanS
                                      wrote on last edited by
                                      #22

                                      Sorry for the slow response - my favourite wife forced me to take leave on Thursday and Friday! Thanks for the information. Does Solaris behave similar to Linux? (I still have to tackle the time on a Solaris 9 machine.) On WinXP PCs, the drift between the "slowest" and the "fastest" PCs is around 100 milliseconds per hour - if we manually sync them every hour, we can expect to be in sync to within a quarter of a second (allowing 100 milliseconds error in the sync process.) On the Linux machine, I added a hwclock --hctosys command to crontab, running every 5 minutes - this gives acceptable drift performance (not quite as good as WinXP.) Thanks for the suggestion of adjtimex - I will have a look at it, but I have a suspicion that this is not available with Linux kernel version 2.4, which we use. Kernel 2.6 definitely supports adjtimex.

                                      L 1 Reply Last reply
                                      0
                                      • S S Douglas

                                        normanS wrote:

                                        my Linux systems drift wildly

                                        I have heard that if you threaten a Windows box with an install CD of *Nix it behaves its self. I wonder if the opposite is true? :) What may I ask are you doing that requires such precision in time keeping?


                                        I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:

                                        N Offline
                                        N Offline
                                        normanS
                                        wrote on last edited by
                                        #23

                                        Sorry for the slow response - my favourite wife forced me to take leave on Thursday and Friday! I have managed to force the Linux machine to update system time according to hardware clock every 5 minutes, which gives acceptable timing performance (but not quite as good as XP.) Regrettably, I can't give information of the application - the defence industry are touchy about these things (and the Russians, the Americans, the Chinese, and the South Africans are all monitoring every word I type, and reading my mail.)

                                        S 1 Reply Last reply
                                        0
                                        • N normanS

                                          Sorry for the slow response - my favourite wife forced me to take leave on Thursday and Friday! I have managed to force the Linux machine to update system time according to hardware clock every 5 minutes, which gives acceptable timing performance (but not quite as good as XP.) Regrettably, I can't give information of the application - the defence industry are touchy about these things (and the Russians, the Americans, the Chinese, and the South Africans are all monitoring every word I type, and reading my mail.)

                                          S Offline
                                          S Offline
                                          S Douglas
                                          wrote on last edited by
                                          #24

                                          normanS wrote:

                                          Sorry for the slow response - my favourite wife forced me to take leave on Thursday and Friday!

                                          Nothing wrong with taking a few days away from the computer, wish I could do the same. :~

                                          normanS wrote:

                                          I have managed to force the Linux machine to update system time according to hardware clock every 5 minutes, which gives acceptable timing performance (but not quite as good as XP.)

                                          That's very strange behavior. If you ever find out the cause, please feel free to drop me an email with the cause & resolution, if you dont mind.

                                          normanS wrote:

                                          Regrettably, I can't give information of the application

                                          Ah, government type work, no biggie, was idly just curious.


                                          I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:

                                          N 2 Replies Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups