2
6 9 2023 Cohort 1 Sync Notes
j edited this page 2023-06-12 14:17:39 +02:00
1433h Started
- Code review
- NTP was selected for time synchronization: see https://gogs.gtsplab.com:5432/SVIG/pricer/src/9af1def1d0a6365fe0cdfe639afa681654b38533/fp2_14.py#L261
- Links to source code files should use the "permalink" button to reference a specific revision, or the line numbers you're referencing will quickly become wrong.
- Windows time infrastructure: https://learn.microsoft.com/en-us/windows-server/networking/windows-time-service/windows-time-service-tools-and-settings?tabs=config
- MacOS time infrastructure: https://keith.github.io/xcode-man-pages/timed.8.html (every 20 minutes)
- Functional vs non-functional requirements (<= 9.1 hours) https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/specialpollinterval-polling-interval-time-service-not-correct
- https://en.wikipedia.org/wiki/Non-functional_requirement
- Filesystems can't express times with finer granularity than 1ms
- Error in terms of time synchronization is expressed in ppm (1 microsecond) or ppb (1 nanosecond)
- Therefore, there's no advantage to synchronizing to less than 1000ppm.
- Windows resync command:
Start-Service W32Time
w32tm /resync
- MacOS resync command:
sudo sntp -sS time.apple.com - Use
platform.system()to figure out whether it's Windows or MacOS, and usesubprocessto run the NTP sync command so the whole computer has accurate time. Make sure to check the return code (0 = success, not zero = failure) - Although
subprocesscan give you the return code directly, it's helpful to know that it's available in the shell/powershell as$?on MacOS/Linux, and$LASTEXITCODEin powershell. - TODO @j figure out how to get systemd running in the container 1515h: Ended