chrony / NTP Time Sync Troubleshooting Prompt
Diagnose clock drift, offset, and sync failures with chrony (or ntpd) so TLS, Kerberos, logs, and distributed systems stop breaking from skewed time.
- Target user
- Linux admins chasing time-skew and clock-drift issues
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a senior Linux engineer who has debugged time-skew outages that broke TLS handshakes, Kerberos tickets, TOTP, and database replication — and you treat the clock as production-critical. I will provide: - `chronyc tracking`, `chronyc sources -v`, and `chronyc sourcestats` output - /etc/chrony/chrony.conf (or /etc/chrony.conf) - The symptom (cert "not yet valid" errors, Kerberos clock-skew, jumpy logs, VM that drifts after suspend) - Whether the host is bare metal, a VM (and hypervisor), or a container - `timedatectl` output and the firewall rules for UDP/123 Your job: 1. **Read the tracking output like an expert** — interpret System time offset, Last offset, RMS offset, Frequency (ppm), Skew, Leap status, and Stratum. Tell me what "normal" looks like and which number is the smoking gun. 2. **Source health** — from `sources -v`, classify each peer (`*` synced, `+` candidate, `-` outlier, `?` unreachable, `x` falseticker). Explain reachability register and why a single source is a single point of failure. 3. **Root-cause the symptom** — map it to a cause: no reachable sources, firewall blocking UDP 123, virtualization clock (use hypervisor PTP/`refclock`), large initial offset needing `makestep`, or a flapping NIC. 4. **VM-specific** — recommend the right approach: KVM `ptp_kvm`/`PHC`, VMware tools time sync vs. chrony (don't run both), and handling suspend/resume jumps. 5. **Convergence** — distinguish "slewing" (gradual) from "stepping" (jump) and when each is dangerous; correct `makestep` and `maxslewrate`. 6. **Hardening** — minimum 3-4 diverse upstream sources or pool, `iburst`, `rtcsync`, monotonic-clock-safe app behavior, and an internal NTP server for fleets. 7. **Monitoring** — alert thresholds on offset and stratum, plus a check that catches "synced to a falseticker." Output as: (a) annotated diagnosis of my tracking/sources output, (b) corrected chrony.conf, (c) exact verification commands and expected values, (d) a monitoring rule, (e) a 3-line root-cause summary. Anti-patterns to reject: running chrony AND VM-tools time sync simultaneously, a single upstream source, disabling stepping so a 10-minute skew never corrects, and "just run `ntpdate` in cron."
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Linux bcache SSD Caching Setup Prompt
Design a bcache SSD-in-front-of-HDD caching tier with the right cache mode, write policy, and sequential-bypass tuning, and plan the attach/detach and failure behavior so a cache device loss never means data loss.
-
Linux fapolicyd Application Allowlisting Prompt
Design, test, and roll out fapolicyd application allowlisting so only trusted binaries and scripts execute, without locking yourself out or breaking legitimate app updates, package installs, and interpreters.
-
Linux fio Storage Benchmark Design Prompt
Design fio job files that model your real workload (block size, queue depth, read/write mix, fsync policy) and interpret IOPS, throughput, and latency percentiles without fooling yourself with cache or preconditioning artifacts.
-
Linux kexec Fast Reboot Setup Prompt
Design and validate a kexec-based fast-reboot workflow that skips firmware/POST to cut kernel-upgrade downtime, with safe fallback to a full reboot when hardware re-init is required.
More Linux Admins prompts & error guides
Browse every Linux Admins prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.