geerlingguy
chronytop
A TUI for chrony NTP time server monitoring
Documentation snapshot
README 快照
翻译暂时拿不到。
机器翻译的项目简介,仅供参考。原文在下方,也可以直接用浏览器自带的整页翻译 (Chrome / Edge 点地址栏右侧的翻译图标,或用右键菜单里的「翻译成中文」)。
下面正文是项目自己的英文 README。想读全文就用浏览器自带的整页翻译: Chrome / Edge 点地址栏右侧的翻译图标,或用右键菜单里的「翻译成中文」; 手机浏览器一般在菜单里。
本页保存的是公开项目资料快照,阅读过程不需要连接 GitHub。
chronytop
图片:CI
A TUI for chrony NTP time server monitoring, in the style of btop.
图片:chronytop demo
It graphs NTP requests per second, and shows server counters, the clients chrony is rate limiting the most, sources, tracking, bandwidth, and CPU and memory use (including chronyd’s).
Panels resize with the terminal, and can be shown or hidden.
Requirements
- Linux, with chrony 4.0 or later (
/usr/bin/chronyc) - Root (or
sudo) for the server and offenders panels, or see Running without root
chronytop is a single static binary with no dependencies outside the Go standard library, so it runs on any distribution (Debian, Ubuntu, Fedora, RHEL, Arch, Alpine, etc.).
Install
Download the binary for your architecture from Releases, and install it:
sudo install -o root -g root -m 755 chronytop-linux-amd64 /usr/local/bin/chronytop
Or build it from source with Go 1.24 or later:
CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -o chronytop .
Usage
sudo chronytop
| Option | Default | Description |
|---|---|---|
-i | 1s | Sample interval (500ms to 10s) |
-p | 100 | Minimum packets for a client to be listed in offenders |
-version | Print the version and exit |
| Key | Action |
|---|---|
1-7 | Show/hide a panel |
+ / - | Slower / faster sampling |
? / h | Show/hide help |
Esc | Close help, or quit |
q | Quit |
Visible panels and the sample interval are saved when you quit, to ~/.config/chronytop/chronytop.conf (/root/.config/... when run with sudo), and restored on the next run. -i overrides the saved interval.
The offenders list is refreshed every 10 seconds in the background. chronyd filters clients by -p itself, so the list stays cheap to fetch on busy public servers with hundreds of thousands of clients.
Running without root
Any user can see the tracking, sources, net, and system panels. The server and offenders panels use chronyd’s serverstats and clients commands, which chronyd only answers over its Unix socket in /run/chrony by default.
chrony 4.7 or later: allow those two commands for local users with opencommands in chrony.conf (/etc/chrony/chrony.conf on Debian and Ubuntu, /etc/chrony.conf elsewhere). The list replaces the defaults, so it repeats them:
opencommands activity manual rtcdata smoothing sourcename sources sourcestats tracking serverstats clients
Then restart chronyd (sudo systemctl restart chrony, or chronyd on Fedora and RHEL) and run chronytop as any user. Only localhost can send these queries unless cmdallow says otherwise.
Older versions: adding your user to chrony’s group (_chrony on Debian and Ubuntu, chrony on Fedora, RHEL, and Arch) only works if that group can write to /run/chrony, since chronyc creates its own reply socket there. Check with:
ls -ld /run/chrony
If it shows drwxrwx---, add your user to the group, then log out and back in:
sudo usermod -aG _chrony $USER
Debian and Ubuntu create the directory with mode 0700 (drwx------), so this doesn’t work there; use sudo instead. Where it does work, it gives full access to chronyd’s control socket, not just its stats, so members of the group can also step the clock or change sources.
Security
Since it usually runs as root, chronytop:
- Only reads from
/procandchronyc, and never opens network connections. - Only writes its settings file, and only if you changed a setting. It skips the file and its directories unless they’re owned by the user running chronytop (so a non-root
HOMEundersudois ignored), and saves through a temporary file, so it never follows a symlink. - Runs
/usr/bin/chronycby absolute path, with a minimal environment and no shell. - Strips non-printable characters from everything it displays, so data from chrony can’t inject terminal escape sequences.
CI runs go vet, staticcheck, gosec, and govulncheck on every change.
License
MIT
Official distribution
获取与安装
暂未发现可确认的官方软件包地址
当前 README 快照没有出现 npm、PyPI、Crates.io、pub.dev 等官方包页链接。本站不会根据仓库名称猜测下载地址。
本站不托管项目文件;需要安装时,请以项目维护者发布的官方文档为准。
Before installing
使用前核验
本站保存公开资料用于阅读,不代表安全审计或功能背书。安装前请核对许可证、依赖来源和发布签名,不要直接运行来源不明的二进制文件或高权限脚本。