SuperAPI AI 工具集

network-diagnostics

部署与运维

查看项目

更新于 10-15 23:49

技能介绍

用途:诊断网络连通性与延迟问题。适用场景包括追踪到远程主机的路由、定位路径丢包或高延迟、对比多个端点的 ping 延迟、查找监听某端口的进程、统计到某服务的已建立连接数、查看本地套接字状态(如 TIME_WAIT)。

主要工具:trippy(trip)结合 traceroute 与 ping,提供 TUI、抖动统计、ASN/地理信息,并支持 json、csv、dot、flows、silent、pretty 等非交互输出,示例:trip example.com、trip -m tcp -p 443 example.com、trip -m icmp/udp/tcp、trip --tui-as-mode asn、trip --mode json -c 10。gping 提供可视化延迟图与多主机并行 ping,示例:gping google.com cloudflare.com amazon.com、gping --cmd "curl -s https://api.example.com/health"、gping -4/-6、-s。ss 是现代 netstat 替代品,支持 TCP/UDP、监听套接字、进程、数字输出及按状态/端口/地址过滤,示例:ss -tlnp、ss -t state established、ss -t 'sport = :443'、ss -s。

用法与限制:安装可用 brew install trippy gping,或 cargo install trippy; cargo install gping;ss 属于 Linux iproute2 通常预装,macOS 需改用 netstat。trippy 的 ICMP 模式需 root 或 CAP_NET_RAW,UDP/TCP 模式无需提权;gping 各平台均不需提权。端口扫描、DNS 查询、二层发现、接口状态、HTTP 压测等任务由其他技能负责,超出本技能范围。