
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
traceroute-caller是Measurement Lab (M-Lab) 开发的网络测量工具,用于处理和分析traceroute数据。它能够与measurementlab/tcpinfo事件和measurementlab/uuid-annotator注释服务协同工作,提供本地开发环境,并包含trex命令行工具,用于解析和分析scamper生成的MDA traceroute数据(JSONL格式)。
tcpinfo和uuid-annotator服务,构建完整的本地测试环境./testdata)快速启动和验证功能前提条件
验证docker-compose版本:
shdocker-compose version
预期输出示例:
docker-compose version 1.27.4, build 40524192 docker-py version: 4.3.1 CPython version: 3.7.7 OpenSSL version: OpenSSL 1.1.1g 21 Apr 2020
启动本地环境
克隆仓库并进入根目录:
shgit clone https://github.com/m-lab/traceroute-caller cd traceroute-caller
使用docker-compose启动服务:
shdocker-compose up
此命令将创建并运行三个容器(前缀为当前目录名,通常为traceroute-caller)。
触发网络连接以生成测试数据:
shdocker exec -it traceroute-caller_traceroute-caller_1 apt-get update
查看生成的结果文件:
shls -lR ./local
停止并重启环境:
shdocker-compose down docker-compose up
安装trex
获取traceroute数据样本(示例使用M-Lab归档数据):
shmkdir ~/traceroutes cd ~/traceroutes gsutil cp gs://archive-measurement-lab/ndt/scamper1/2021/10/01/20211001T003000.005106Z-scamper1-mlab1-lis02-ndt.tgz . tar xzf 20211001T003000.005106Z-scamper1-mlab1-lis02-ndt.tgz
构建trex工具:
shgit clone https://github.com/m-lab/traceroute-caller cd traceroute-caller/cmd/trex go build
基本用法
查看帮助信息:
sh./trex -h
输出:
Usage: ./trex [-cehv] [-d <seconds>] path [path...] path a pathname to a file or directory (if directory, all files are processed recursively) -h print usage message and exit -c print flow IDs and file names of traceroutes that completed ("--" for incomplete traceroutes) -d print times and file names of traceroutes that took more than the specified duration -e print examples how to use this tool and exit -v enable verbose mode (mostly for debugging)
常用命令示例
提取单路径traceroute:
sh./trex /traceroutes/2022/04/01/20220401T001905Z_ndt-qqvlt_1647967485_000000000009379D.jsonl
输出示例:
file: /traceroutes/2022/04/01/20220401T001905Z_ndt-qqvlt_1647967485_000000000009379D.jsonl src: 209.170.110.216 dst: 199.19.248.6 scamper start: 1648772345 tracelb start: 1648772345 (0 seconds after scamper start) scamper stop: 1648772346 (1 seconds after scamper start) flowid: 1 TTL TX(ms) RX(ms) RTT(ms) IP address 1 N/A N/A 0.000 209.170.110.193 2 150 151 0.653 213.248.100.57 3 1055 1062 7.244 199.19.248.6 <=== destination
启用verbose模式:
sh./trex -v /traceroutes/2022/04/01/20220401T001905Z_ndt-qqvlt_1647967485_000000000009379D.jsonl
输出将包含所有flow ID的详细路径信息。
筛选长时traceroute(超过300秒):
sh./trex -d 300 /traceroutes/2021
输出示例:
428 /traceroutes/2021/10/01/20211001T000053Z_ndt-292jb_1632518393_00000000000516D4.jsonl 386 /traceroutes/2021/10/01/20211001T000151Z_ndt-292jb_1632518393_000000000005160D.jsonl ... files found: 425 files skipped (not .jsonl): 0 files that could not be read: 0 files that could not be parsed: 0 files successfully parsed: 425 files with no traceroute data: 0 minimum duration: 4 seconds maximum duration: 456 seconds average duration: 220 seconds
检查traceroute完整性:
sh./trex -c /traceroutes/2021
输出示例:
1 /traceroutes/2021/10/01/20211001T000014Z_ndt-292jb_***_00000000000516C8.jsonl 1 /traceroutes/2021/10/01/20211001T000015Z_ndt-292jb_***_00000000000516C9.jsonl -- /traceroutes/2021/10/01/20211001T000023Z_ndt-292jb_***_00000000000516C4.jsonl ... files found: 425 files skipped (not .jsonl): 0 files that could not be read: 0 files that could not be parsed: 0 files successfully parsed: 425 files with no traceroute data: 0 files with complete traceroutes: 149 (35%)
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务