20260710 rpctl统一实验标识为exp-id
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# rpctl
|
||||
|
||||
`rpctl` 是四款 RP 本地控制 CLI,用于在实验服务器本地独立启动、停止和观察单个 RP/profile 的 all5 run。
|
||||
`rpctl` 是四款 RP 本地控制 CLI,用于在实验服务器本地独立启动、停止和观察单个 RP/profile 的 all5 实验。一个实验可包含一次 snapshot 和多次 delta 子 run。
|
||||
|
||||
## 部署
|
||||
|
||||
@@ -20,12 +20,12 @@ ssh root@47.77.237.41 'cd /root/rpki_4rp_ctl && ./rpctl init --bundle /root/rpki
|
||||
./rpctl status
|
||||
./rpctl start --rp ours-pp-object-cache --interval 10m --runs 6 --rirs all5
|
||||
./rpctl start --rp routinator --interval 0 --runs 1 --rirs apnic
|
||||
./rpctl continue --run-id <successful-run-id> --runs 3 --interval 10m
|
||||
./rpctl continue --exp-id <successful-exp-id> --runs 3 --interval 10m
|
||||
./rpctl tail
|
||||
./rpctl show
|
||||
./rpctl show --failed
|
||||
./rpctl view --run-id 20260709T081122Z_ours-pp-object-cache_2runs_600s
|
||||
./rpctl delete --run-id <old-run-id> --dry-run
|
||||
./rpctl view --exp-id 20260709T081122Z_ours-pp-object-cache_2runs_600s
|
||||
./rpctl delete --exp-id <old-exp-id> --dry-run
|
||||
./rpctl paths
|
||||
./rpctl stop
|
||||
./rpctl stop --force
|
||||
@@ -50,10 +50,10 @@ ssh root@47.77.237.41 'cd /root/rpki_4rp_ctl && ./rpctl init --bundle /root/rpki
|
||||
bin/ lib/ fixtures/ scripts/
|
||||
state/current.json
|
||||
logs/runner-*.log
|
||||
runs/<profile>/<run-id>/profiles/<profile>/runs/run_0001/
|
||||
runs/<profile>/<exp-id>/profiles/<profile>/runs/run_0001/
|
||||
```
|
||||
|
||||
每个 run 目录包含 `stdout.log`、`stderr.log`、`process-time.txt`、`exit-code.txt`、`run-meta.json` 以及各 RP 产物。
|
||||
每个子 run 目录包含 `stdout.log`、`stderr.log`、`process-time.txt`、`exit-code.txt`、`run-meta.json` 以及各 RP 产物。
|
||||
|
||||
## 历史查看与删除
|
||||
|
||||
@@ -64,7 +64,7 @@ ssh root@47.77.237.41 'cd /root/rpki_4rp_ctl && ./rpctl init --bundle /root/rpki
|
||||
./rpctl show --json
|
||||
```
|
||||
|
||||
`show` 会扫描 `runs/<profile>/<run-id>/`,展示历史 `run_id`、状态、start/end 时间、失败 run 列表、运行参数、产物数量和目录路径。
|
||||
`show` 会扫描 `runs/<profile>/<exp-id>/`,展示历史 `exp_id`、状态、start/end 时间、失败子 run 列表、运行参数、产物数量和目录路径。
|
||||
|
||||
默认表格为了可读性不显示完整路径;需要路径时使用:
|
||||
|
||||
@@ -73,31 +73,31 @@ ssh root@47.77.237.41 'cd /root/rpki_4rp_ctl && ./rpctl init --bundle /root/rpki
|
||||
```
|
||||
|
||||
```bash
|
||||
./rpctl view --run-id <run-id>
|
||||
./rpctl view --rp ours --run-id <run-id>
|
||||
./rpctl view --run-id <run-id> --command
|
||||
./rpctl view --run-id <run-id> --json
|
||||
./rpctl view --exp-id <exp-id>
|
||||
./rpctl view --rp ours --exp-id <exp-id>
|
||||
./rpctl view --exp-id <exp-id> --command
|
||||
./rpctl view --exp-id <exp-id> --json
|
||||
```
|
||||
|
||||
`view` 用于查看指定历史 run 的摘要和每一轮子 run 明细,包括运行耗时、max RSS、VRP/VAP 数量、同步模式、exit code 和目录路径。
|
||||
`view` 用于查看指定历史实验的摘要和每一轮子 run 明细,包括运行耗时、max RSS、VRP/VAP 数量、同步模式、exit code 和目录路径。
|
||||
|
||||
```bash
|
||||
./rpctl delete --run-id <old-run-id> --dry-run
|
||||
./rpctl delete --run-id <old-run-id> --yes
|
||||
./rpctl delete --rp ours --run-id <duplicated-run-id> --yes
|
||||
./rpctl delete --exp-id <old-exp-id> --dry-run
|
||||
./rpctl delete --exp-id <old-exp-id> --yes
|
||||
./rpctl delete --rp ours --exp-id <duplicated-exp-id> --yes
|
||||
```
|
||||
|
||||
`delete` 只能删除非 running 的 run。建议先用 `--dry-run` 确认路径;真实删除必须显式加 `--yes`。删除内容包括 `runs/<profile>/<run-id>/` 和匹配的 `logs/runner-<run-id>*.log`。
|
||||
`delete` 只能删除非 running 的实验。建议先用 `--dry-run` 确认路径;真实删除必须显式加 `--yes`。删除内容包括 `runs/<profile>/<exp-id>/` 和匹配的 `logs/runner-<exp-id>*.log`。
|
||||
|
||||
如果历史 run 是中途停止的 incomplete run,且没有 `run-meta.json`、normalized 文件或原始输出文件,则 VRP/VAP、wall、RSS 会显示为 `-`,表示该 run 没有可统计产物。
|
||||
如果历史实验中最后一个子 run 中途停止,且没有 `run-meta.json`、normalized 文件或原始输出文件,则 VRP/VAP、wall、RSS 会显示为 `-`,表示该子 run 没有可统计产物。
|
||||
|
||||
## 续跑已有成功 run
|
||||
## 续跑已有成功实验
|
||||
|
||||
```bash
|
||||
./rpctl continue --run-id <successful-run-id> --runs 3 --interval 10m
|
||||
./rpctl continue --rp routinator --run-id <successful-run-id> --runs 1 --interval 0
|
||||
./rpctl continue --exp-id <successful-exp-id> --runs 3 --interval 10m
|
||||
./rpctl continue --rp routinator --exp-id <successful-exp-id> --runs 1 --interval 0
|
||||
```
|
||||
|
||||
`continue` 只接受已经成功结束的历史 run id,并在原目录下追加 `run_000N`。它不会清理 profile state,也不会给 RP 强制传 snapshot-only 参数;后续 run 是 delta 还是 snapshot 由各 RP 根据自身持久状态决定。
|
||||
`continue` 只接受已经成功结束的历史实验 `exp_id`,并在原目录下追加 `run_000N`。它不会清理 profile state,也不会给 RP 强制传 snapshot-only 参数;后续子 run 是 delta 还是 snapshot 由各 RP 根据自身持久状态决定。
|
||||
|
||||
续跑会复用原 run 的 RIR 集合,避免在同一个 state 目录里混用不同 scope。若同一个 `run-id` 在多个 profile 下存在,需要加 `--rp` 消歧。
|
||||
续跑会复用原实验的 RIR 集合,避免在同一个 state 目录里混用不同 scope。若同一个 `exp-id` 在多个 profile 下存在,需要加 `--rp` 消歧。
|
||||
|
||||
Reference in New Issue
Block a user