How tushar1831/ntp-monitoring works
NTP Client Monitor polls configured time servers, measures offset and delay, optionally corrects the host clock, and publishes XML status and event history. Users can start it through the CLI or a Windows service; the desktop GUI configures and observes the service-owned monitor rather than polling independently. The graph includes configuration, protocol, clock, persistence, and desktop/service-control layers. Relationships are limited to those shown in excerpts or documented in the README; platform service behavior is represented at the adapter boundary.
Main entry points: monitor.py Monitor cycle · desktop.py Desktop adapter · main.py CLI entry · xml_logger.py XML writer
Components 15
Entry and setup
- CLI entry
main.py - Config validation
ntp_client/config.py
Time monitoring
- Monitor cycle
ntp_client/monitor.py - SNTP query
ntp_client/ntp_query.py - Clock setter
ntp_client/system_clock.py
XML records
- XML writer
ntp_client/xml_logger.py - Event history XML
- Status snapshot XML
Desktop and services
- Desktop window
gui.py - Desktop adapter
ntp_client/desktop.py - Windows service
install/windows_service.py - OS service manager
Other components
- Operator
- NTP servers
- System clock
Connections 18
- Operator → CLI entry: runs
README.md - Operator → Desktop window: opens
README.md - CLI entry → Config validation: loads
main.py - CLI entry → Monitor cycle: starts
main.py - Windows service → Config validation: loads
install/windows_service.py - Windows service → Monitor cycle: starts
install/windows_service.py - Desktop window → Desktop adapter: reads and controls
gui.py - Desktop adapter → OS service manager: controls
ntp_client/desktop.py - OS service manager → Windows service: manages
- Monitor cycle → SNTP query: queries
ntp_client/monitor.py - SNTP query → NTP servers: sends UDP query
ntp_client/ntp_query.py - Monitor cycle → Clock setter: requests correction
ntp_client/monitor.py - Clock setter → System clock: sets time
ntp_client/system_clock.py - Monitor cycle → XML writer: records cycle
ntp_client/monitor.py - XML writer → Event history XML: writes
README.md - XML writer → Status snapshot XML: replaces
README.md - Desktop adapter → Status snapshot XML: reads
ntp_client/desktop.py - Desktop adapter → Event history XML: reads
ntp_client/desktop.py