# NBping **Repository Path**: anydev/NBping ## Basic Information - **Project Name**: NBping - **Description**: Rust 的多地址并发 Ping 工具。这是一个用 Rust 开发的可视化 Ping 工具,支持同时对多个目标地址并发 Ping 操作。它提供了分区折线图和表格视图等可视化展示,支持实时动态展示延迟、丢包率等性能指标,同时兼容 IPv4 和 IPv6 网络环境。 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-30 - **Last Updated**: 2026-07-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

🏎 NBping

NBping 是一个基于 Rust 开发的终端可视化 Ping 工具, 支持多地址并发 Ping, 可视化图表展示, 数据实时更新等特性

NBping demo

Featured|HelloGitHub hanshuaikang%2FNBping | Trendshift

NBping demo

📢 **Nping 现在已经更名为 NBPing(nbping)** > [!IMPORTANT] > **更名通知** > > 本项目已从 **Nping** 正式更名为 **NBPing**。 > > 请相应更新您的书签、依赖项和安装脚本。旧名称现已弃用,不再维护。 > ```bash > nbping --help > ``` ** Exporter 模式 ** 现在 NBping 支持通过将 Ping 指标数据通过 Prometheus 格式导出,你可以使用 Grafana 等工具进行可视化展示。 ```bash nbping exporter www.baidu.com www.google.com -i 1 -p 9100 ``` 然后你可以访问获取这些数据 `http://localhost:9100/metrics` 你可以通过 Grafana 来可视化这些数据

NBping demo

## Installation #### MacOS Homebrew ```bash brew install nbping nbping --help ``` ## Feature: - TCP Ping 支持 - IP 段 Ping 支持 ## 后续的计划: - UI 界面优化, 增加更多的动态效果 ## Usage ```bash nbping www.baidu.com www.google.com www.apple.com www.sina.com -c 20 -i 2 nbping --help 🏎 NBping mean NB Ping, A Ping Tool in Rust with Real-Time Data and Visualizations Usage: nbping [OPTIONS] ... Arguments: ... target IP address or hostname to ping Options: --config Path to a YAML config file (CLI flags override its values) -c, --count Number of pings to send [default: 0 = unlimited] -i, --interval Interval in seconds between pings [default: 0] -6, --force_ipv6 Force using IPv6 (config-only field can also enable this) -m, --multiple Specify the maximum number of target addresses, Only works on one target address [default: 0] -v, --view-type Initial view mode: graph/table/point/sparkline (switch at runtime with 1-4 / Tab) [default: graph] -o, --output Output file to save ping results -h, --help Print help -V, --version Print version ``` ### Exporter Usage ```bash nbping exporter www.baidu.com www.google.com -i 1 -p 9100 ./nbping exporter --help Exporter mode for monitoring Usage: nbping exporter [OPTIONS] [TARGET]... Arguments: [TARGET]... target IP addresses or hostnames to ping Options: --config Path to a YAML config file (CLI flags override its values) -i, --interval Interval in seconds between pings [default: 1] -p, --port Prometheus metrics HTTP port [default: 9090] -6, --force_ipv6 Force using IPv6 (config-only field can also enable this) -h, --help Print help ``` ### 配置文件 除了命令行参数,你也可以通过 `--config` 从 YAML 文件启动 NBping: ```bash nbping --config nbping.yaml ``` 配置文件的字段与命令行参数一一对应,完整示例见 [`nbping.example.yaml`](nbping.example.yaml): ```yaml mode: tui # tui | exporter(默认 tui) targets: - google.com - github.com - apple.com - baidu.com - 1.1.1.1 count: 0 # 0 = 不限次数 interval: 1 # 间隔秒数 force_ipv6: false multiple: 0 # 仅 tui 模式 view_type: graph # graph | table | point | sparkline(仅 tui 模式) # output: results.log # 仅 tui 模式 port: 9090 # 仅 exporter 模式 ``` 说明: - **优先级:** 命令行参数 > YAML 配置 > 内置默认值。例如 `nbping --config nbping.yaml -i 1` 会强制使用 1 秒间隔,无视配置文件中的值。 - **模式:** 未使用子命令时,由 `mode` 字段决定走 TUI 还是 exporter 模式;显式执行 `nbping exporter ...` 子命令则始终为 exporter 模式。 - **`force_ipv6`:** `-6` 命令行 flag 只能开启 IPv6;若配置文件已开启而想关闭,请在文件中设置 `force_ipv6: false`。 - 未知字段会被拒绝,因此拼写错误会在启动时直接报错。 ## 致谢 感谢这些朋友对 NBping 提出的反馈和建议。 | [ThatFlower](https://github.com/ThatFlower) | [zx4i](https://github.com/zx4i) | [snail2sky](https://github.com/snail2sky) | [shenshouer](https://github.com/shenshouer) | [vnt-dev](https://github.com/vnt-dev) | [qingyuan0o0](https://github.com/qingyuan0o0) | [Onlywzr](https://github.com/Onlywzr) 感谢以下自媒体对 NBping 的关注和转发。 | [阮一峰的网络日志](https://www.ruanyifeng.com/blog/weekly/) |[Rust 中文社区](https://rustcc.cn/) | [公众号:奇妙的linux世界](https://mp.weixin.qq.com/s/lK_OqKp2yY8lDBoyLxtdGA) | [公众号:IT运维技术圈](https://mp.weixin.qq.com/s/bDJZ-H02dIKG3R7LQCeyaQ) | [X:@geekbb](https://x.com/geekbb/status/1875754541905539510) | [公众号:一飞开源](https://mp.weixin.qq.com/s/BZjr54h8dIQgzr8UW3fwOQ) | [公众号: 开源日记](https://mp.weixin.qq.com/s/uGtkD4x_XOFyKNbIy5pHYA) ## Star History [![Star History Chart](https://api.star-history.com/svg?repos=hanshuaikang/Nping&type=Date)](https://star-history.com/#hanshuaikang/Nping&Date)