Rkik v2.0.0 – NTP、NTS、PTP 诊断,预设和配置,Docker 测试实验室
嗨,HN,
我很高兴地宣布 rkik v2.0.0,这是 Rusty Klock Inspection Kit 的一次重大更新。这是一个无状态的命令行工具和库,用于检查网络时间协议(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 主时钟,从而实现一致的质量保证和持续集成演示。
命令行界面重新设计和文档
- CLI v2 规范已记录在 docs/cli_v2.md 中。新的子命令布局和改进的人机工程学设计。
rkik 最初是一个轻量级的工具,用于在没有守护进程或根权限的情况下检查 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