快速检查命令
openclaw status # 本地摘要:gateway 可达性、更新提示、channel 认证年龄
openclaw status --all # 完整本地诊断(只读,安全可粘贴)
openclaw status --deep # 向运行中 gateway 请求实时健康探测
openclaw health # 向运行中 gateway 请求健康快照
openclaw health --verbose # 强制实时探测,打印 gateway 连接详情
openclaw health --json # 机器可读健康快照输出在 WhatsApp/WebChat 中发送 /status 可获取状态回复(不触发 agent)。
深度诊断
# 查看凭证文件
ls -l ~/.openclaw/credentials/whatsapp/<accountId>/creds.json
# 查看会话存储
ls -l ~/.openclaw/agents/<agentId>/sessions/sessions.json
# 重新链接(出现 409-515 或 loggedOut 时)
openclaw channels logout && openclaw channels login --verbose
# 导出诊断包
openclaw gateway diagnostics export健康监控配置
{
gateway: {
channelHealthCheckMinutes: 5, // 检查频率,0 禁用
channelStaleEventThresholdMinutes: 30, // 空闲多久视为过期
channelMaxRestartsPerHour: 10, // 每小时最大重启次数
},
channels: {
"<provider>": {
healthMonitor: { enabled: true }, // 禁用特定 channel 的健康监控
}
}
}支持 per-channel 覆盖的 channel:Discord、Google Chat、iMessage、Microsoft Teams、Signal、Slack、Telegram、WhatsApp。
常见故障处理
| 症状 | 处理方式 |
|---|---|
logged out 或状态 409-515 | openclaw channels logout && openclaw channels login |
| Gateway 不可达 | openclaw gateway --port 18789(端口占用时加 --force) |
| 无入站消息 | 确认手机在线,检查 allowFrom 和 mention 规则 |
health 命令详情
openclaw health 选项:
--json:机器可读 JSON 输出--timeout <ms>:覆盖默认 10s 探测超时--verbose:强制实时探测--debug:--verbose的别名
健康快照包含:ok(布尔值)、ts(时间戳)、durationMs、per-channel 状态、agent 可用性、会话存储摘要。
相关链接
- gateway-diagnostics — 诊断导出
- gateway-troubleshooting — 故障排查