Files
ssw-tds-test/build/ss-sample.sh
T
ssw-tds-test eae92ea13a feat(build): TDS 正路三方下发脚本 + LR/控制面/作废打通证据
- e2e-tds-dispatch-3party.sh:preflight → 造数 → Redispatch → 轮询
  三方状态机 → 回收日志,一条命令复现正路。
- 产物改推整目录并带 manifest.json(参与 dirDigest,换算子即换哈希)。
- apply-connector-config-3party.sh:控制面 Bearer 中转 + 二进制替换;
  停进程先 TERM 再 KILL(-9 打坏内嵌 PGlite,日志会涨到 GB 级)。
- 新增 emergency-restart / clean-mpc / collect-mpc-logs 三个运维脚本。
- 证据 evidence/bridge-2026-11-14/ 记录三项打通实测与仍存边界。
- .gitignore 补 build/out/(交叉编译产物 143M,可重建不入库)。
2026-11-14 11:47:40 +08:00

22 lines
671 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/sh
# ss-sample.sh —— 采样本机与 9449(mpc peer)相关的 TCP 连接,用于「真联通」取证。
# 用法: sh ss-sample.sh <秒数> <输出文件>
# 兼容:ss(iproute2)/ netstat(BusyBox)
DUR="${1:-60}"
OUT="${2:-/tmp/ss-sample.log}"
: > "$OUT"
END=$(( $(date +%s) + DUR ))
while [ "$(date +%s)" -lt "$END" ]; do
if command -v ss >/dev/null 2>&1; then
L=$(ss -tn 2>/dev/null | awk 'NR==1 || /:9449/')
else
L=$(netstat -tn 2>/dev/null | awk 'NR<=2 || /:9449/')
fi
if [ "$(echo "$L" | wc -l)" -gt 2 ]; then
echo "--- $(date +%H:%M:%S) ---" >> "$OUT"
echo "$L" >> "$OUT"
fi
sleep 0.3
done
echo "sampled -> $OUT"