返回顶部
c

clawdbot-logsClawdbot日志分析

Analyze Clawdbot logs and diagnostics. Use when the user asks about bot performance, response times, errors, session stats, token usage, API costs, or wants to debug slow responses.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
4,076
下载量
免费
免费
7
收藏
概述
安装方式
版本历史

clawdbot-logs

Clawdbot 日志与诊断

分析 Clawdbot 性能、错误和会话数据。

快速命令

响应时间(最近 N 条消息)

bash scripts/response-times.sh [数量]

最近错误

bash journalctl --user -u clawdbot-gateway.service --no-pager --since 1小时前 | grep -iE (error|fail|invalid) | tail -20

会话统计

bash scripts/session-stats.sh

网关状态

bash systemctl --user status clawdbot-gateway.service --no-pager

配置验证

bash cat ~/.clawdbot/clawdbot.json | jq . > /dev/null && echo 配置有效 || echo 配置无效

日志来源

来源位置包含内容
日志系统journalctl --user -u clawdbot-gateway.service会话状态、错误、工具执行
每日日志
/tmp/clawdbot/clawdbot-YYYY-MM-DD.log | 详细 JSON 日志 | | 会话文件 | ~/.clawdbot/agents/main/sessions/*.jsonl | 完整对话、令牌使用、费用 | | 会话元数据 | ~/.clawdbot/agents/main/sessions/sessions.json | 当前会话状态、模型信息 |

常见诊断

响应缓慢

  1. 1. 检查响应时间:scripts/response-times.sh 20
  2. 检查 sessions.json 中的令牌数:jq .[agent:main:main].totalTokens ~/.clawdbot/agents/main/sessions/sessions.json
  3. 如果令牌数 > 30000,在 Telegram 中运行 /compact 或启动新会话

配置错误

bash journalctl --user -u clawdbot-gateway.service --no-pager --since 10分钟前 | grep -i invalid config

API 费用(来自会话)

bash scripts/session-stats.sh

实用模式

按类别过滤日志

bash

会话状态变更

journalctl --user -u clawdbot-gateway.service | grep session state

工具执行

journalctl --user -u clawdbot-gateway.service | grep \[tools\]

Telegram 活动

journalctl --user -u clawdbot-gateway.service | grep \[telegram\]

解析会话文件获取最近消息

bash tail -20 ~/.clawdbot/agents/main/sessions/*.jsonl | jq -r select(.message.role==user) | .message.content[0].text 2>/dev/null | tail -10

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 clawdbot-logs-1776389365 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 clawdbot-logs-1776389365 技能

通过命令行安装

skillhub install clawdbot-logs-1776389365

下载

⬇ 下载 clawdbot-logs v1.0.0(免费)

文件大小: 3.23 KB | 发布时间: 2026-4-17 14:09

v1.0.0 最新 2026-4-17 14:09
- Initial release of clawdbot-logs.
- Provides commands and instructions to analyze Clawdbot logs, performance, errors, response times, session stats, token usage, and API costs.
- Includes quick diagnostic scripts and common troubleshooting patterns.
- Documents log locations and filtering methods for efficient debugging.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部