Rkik v2.0.0 – NTP、NTS、PTP诊断、预设配置、Docker测试实验室
2 分•作者: aguacero7•3 天前
嗨 HN,
我很高兴宣布 rkik v2.0.0,这是 Rusty Klock Inspection Kit 的一次重大更新,它是一个无状态的 CLI 工具和库,用于检查跨基础设施的网络时间协议(NTP/NTS)和精密时钟。本次发布使该项目远远超出了其最初作为简单 NTP 偏移量检查器的范围。
v2.0.0 的新功能
网络时间安全 (NTS) 支持
- 完全集成的 RFC 8915 NTS 实现,具有诊断细节。
- --nts 标志用于启用身份验证和加密的 NTS 会话。
- 可调节的 --nts-port、握手时序、cookie 指标、协商的 AEAD 算法和证书检查(主题、颁发者、有效性、指纹)。
- 所有 NTS 诊断数据的 JSON 导出。
NTS 与现有的功能(如比较和插件模式)一起工作。
精密时间协议 (PTP) 诊断
- 新的 --ptp 开关,用于查询 IEEE-1588 环境(仅限 Linux)。
- 处理域和端口控制(--ptp-domain、--ptp-event-port、--ptp-general-port)。
- 可选的硬件时间戳(--ptp-hw-timestamp)和广泛的主时钟信息。
- 支持文本、结构化 JSON、比较输出和插件行。
- 库原语 (PtpProbeResult, PtpQueryOptions, …) 用于嵌入其他工具中。
配置和预设管理
- 通过 rkik config 进行持久配置,并通过 rkik preset 进行工作区预设,存储在 ~/.config/rkik/config.toml 中(通过 RKIK_CONFIG_DIR 覆盖)。
- 预设允许您定义可重用的探测集并按名称运行它们。
测试实验室和 Docker 环境
- 新的基于 Docker 的测试环境 (./scripts/test-env-up.sh) 用于在本地启动多个 NTP 守护程序和一个 PTP 主时钟,从而实现一致的 QA 和 CI 演示。
CLI 重新设计和文档
- CLI v2 规范记录在 docs/cli_v2.md 中。新的子命令布局和改进的人体工程学设计。
rkik 最初是一个无需守护程序或 root 即可检查 NTP 响应的轻量级方法,但通过 v2.0.0,它成为了一个全面的诊断和可观察性工具包,适用于 SRE、网络工程师和基础设施运维人员,他们需要精确地了解分布式系统中的时钟行为。
所有源代码和发布版本都可以在 GitHub 上找到:
https://github.com/aguacero7/rkik
查看原文
Hi HN,<p>I’m excited to announce rkik v2.0.0, a major update to Rusty Klock Inspection Kit, a stateless CLI tool and library for inspecting network time protocols (NTP/NTS) and precision clocks across infrastructure. This release advances the project well beyond its original scope as a simple NTP offset inspector.<p>What’s new in v2.0.0<p>Network Time Security (NTS) support
- Fully integrated RFC 8915 NTS implementation with diagnostic detail.
- --nts flag to enable authentication and encrypted NTS sessions.
- Adjustable --nts-port, handshake timing, cookie metrics, negotiated AEAD algorithms, and certificate inspection (subject, issuer, validity, fingerprints).
- JSON export of all NTS diagnostic data.
NTS works alongside existing features like compare and plugin modes.<p>Precision Time Protocol (PTP) diagnostics
- New --ptp switch for querying IEEE-1588 environments (Linux only).
- Handles domain and port controls (--ptp-domain, --ptp-event-port, --ptp-general-port).
- Optional hardware timestamping (--ptp-hw-timestamp) and extensive master clock info.
- Supports text, structured JSON, compare output, and plugin lines.
- Library primitives (PtpProbeResult, PtpQueryOptions, …) for embedding in other tools.<p>Config & presets management
- Persistent configuration via rkik config and workspace presets via rkik preset, stored in ~/.config/rkik/config.toml (override via RKIK_CONFIG_DIR).
- Presets let you define reusable probe sets and run them by name.<p>Test lab & Docker environment
- New Docker-based test environment (./scripts/test-env-up.sh) to spin up multiple NTP daemons and a PTP grandmaster locally, enabling consistent QA and CI demos.<p>CLI redesign and documentation
- CLI v2 spec documented in docs/cli_v2.md. New subcommand layout and improved ergonomics.<p>rkik started as a lightweight way to inspect NTP responses without daemons or root, but with v2.0.0 it becomes a comprehensive diagnostics and observability toolkit for time-related protocols, suitable for SREs, network engineers, and infrastructure operators who need precise insight into clock behavior across distributed systems.<p>All sources and releases are available on GitHub:
https://github.com/aguacero7/rkik