← 返回
未分类 中文

Dashboard Generator

Generate self-contained HTML dashboards for memory logs, expense charts, and token usage. Run hourly via cron.
生成自包含的 HTML 仪表板,用于内存日志、费用图表和 token 使用情况,按 cron 每小时运行。
hohobohan
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 107
下载
💾 0
安装
1
版本
#latest

概述

Dashboard Generator

Three dashboards served on port 8081 via scripts/serve-dashboards.py. Regenerated hourly with a 5-minute stagger.

Dashboard types

DashboardFileContent
--------------------------
Memorymemory/dashboard.htmlAll daily logs embedded as cards, searchable
Expensedashboard/usage/expense-data.jsonAll ledger entries as JSON (fed to chart)
Usagedashboard/usage/dashboard.jsonToken counts, costs, calls per source

Regeneration (hourly, :00 + 5min stagger)

Run in order:

/usr/bin/python3 /home/hobopi/.openclaw/workspace/scripts/gen-memory-dashboard.py
/usr/bin/python3 /home/hobopi/.openclaw/workspace/scripts/gen-expense-data.py
/usr/bin/python3 /home/hobopi/.openclaw/workspace/scripts/track-usage.py --dashboard
  • Timeout: 180s for all three
  • Cron: isolated agentTurn, delivery mode none (no Telegram notification)

Dashboard server (8081)

  • Script: scripts/serve-dashboards.py
  • Serves files from /home/hobopi/.openclaw/workspace/dashboard/ and /home/hobopi/.openclaw/workspace/memory/
  • Watchdog cron (every 300ms): checks HTTP 200 on port 8081 every 5 minutes
  • If down: kills old process, restarts script, rechecks
  • Watchdog uses default model (not time-sensitive, no user delivery)

Token usage tracker

  • Script: scripts/track-usage.py
  • Sources: OpenClaw trajectory files (~May 11+), Hermes state.db (~May 14+), Muthu
  • Pricing: MiniMax models (M2.7, M2.5, M3) — rates in script
  • --update: pull all sources, write daily/monthly JSON
  • --dashboard: regenerate combined dashboard JSON
  • --today/--week/--month/--all: summary views

Dashboard JSON structure

{
  "generated": "2026-06-03T12:00:00",
  "combined": [
    {"date": "2026-06-03", "source": "openclaw", "input": 123456, "output": 23456, "cost": 1.23},
    {"date": "2026-06-03", "source": "hermes", "input": 654321, "output": 12345, "cost": 3.45}
  ],
  "monthly": {"2026-06": {"totalCost": 45.67, ...}}
}

Memory dashboard HTML

  • Self-contained single HTML file (no external dependencies)
  • All daily log content embedded in JS object
  • Navigation by date, search, keyword filtering
  • Dark theme matching Yoda Patch aesthetic

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-06-04 14:13

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

Inbox Manager

hohobohan
授权、读取、分类、归档、删除并汇总多个账户的 Gmail 收件箱。使用 Gmail API 和 OAuth。
★ 0 📥 140

Sync Adapter

hohobohan
本地 .md 文件同步至 Google 表格,使用去重哈希,适用于支出、投资及任意键值数据。
★ 0 📥 137

News Curator

hohobohan
抓取、过滤、去重后通过Telegram推送精选新闻简报,金融来源Benzinga,科技来源AI新闻RSS。
★ 0 📥 139