#!/bin/bash # relay-stability 的进度快照 set -u echo " ── 2 小时长测 ──" if [ -f /root/rp_long2h.sh ]; then start=$(stat -c %Y /root/rp_long2h.sh) echo " 起于 $(date -d @"$start" '+%H:%M:%S'),现在 $(date '+%H:%M:%S')" fi n=$(wc -l < /root/long2h_health.tsv 2>/dev/null || echo 0) echo " 已采样 $n 次" echo " 进程数: $(pgrep -c -f rp_long2h.sh 2>/dev/null || echo 0)" echo " 最后 3 条:" tail -3 /root/long2h_health.tsv 2>/dev/null | sed 's/^/ /' echo echo " ── 配比对照有没有开始 ──" for s in lanremote-tunnel lanremote-tunnel-h2; do printf " %-24s %s\n" "$s" \ "$(grep -oE -- '--protocol [a-z0-9]+|--ha-connections [0-9]+' \ "/etc/systemd/system/$s.service" 2>/dev/null | tr '\n' ' ')" done echo echo " ── 它最近改过的脚本 ──" ls -la --time-style=+%H:%M:%S /root/rp_*.sh /root/rp_*.py 2>/dev/null \ | awk '{printf " %-34s %s %s\n", $7, $6, $5}' | tail -8 echo echo " ── 公网 ──" curl -s --max-time 20 -o /dev/null -w ' HTTP %{http_code} %{time_total}s\n' \ -H 'User-Agent: LanRemote/1.8.2' https://relay.xxmxxs.top/v1/health