← 返回 Skills 市场
lichm1007

Boot Kpi Analyzer

作者 lichm1007 · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
260
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install boot-kpi-analyzer
功能描述
分析并定位SS4车机开关机关键性能指标,支持开机慢、关机慢等问题的时序数据自动化分析与报告生成。
使用说明 (SKILL.md)

Boot KPI Analyzer Skill

功能描述

分析 SS4 车机的开机 KPI 和关机 KPI 时序数据,帮助定位启动慢、关机慢等性能问题。

数据路径

开机 KPI(Boot KPI)

/home/lixiang/work/sdata/code/smk-1125/boot_kpi_server/backend/uploads/\x3CYYYYMMDD_HHMMSS>/

每个子目录包含:

  • boot_kpi_summary.txt — 预分析的中文摘要报告(3部分:系统服务启动分析、qcrosvm依赖分析、qcrosvm启动性能)
  • boot_kpi.log — 原始事件:\x3Cservice> -> \x3Cstate> at \x3Cms>ms from system boot
  • unit_kpi.log — modemanager 日志:[UnitKPI] Dependency of qcrosvm.service ... -> \x3Cstate> at \x3Cms>ms

关机 KPI(Shutdown KPI)

/home/lixiang/work/sdata/code/smk-1125/boot_kpi_server/backend/reboot_tests/\x3CYYYYMMDD_HHMMSS>/

每个子目录包含:

  • report.json — 测试报告,包含 reboot_duration(整个重启周期秒数)、test_result、build_id 等
  • shutdown-monitor-units.log — BPF 跟踪的关机事件日志

Web 查询接口(私有 IP,须用 curl)

http://10.122.86.46:9999/

⚠️ web_fetch 无法访问私有 IP,必须使用 execute_command 运行 curl 命令。

使用方法

列出可用的开机 KPI 数据

ls /home/lixiang/work/sdata/code/smk-1125/boot_kpi_server/backend/uploads/

列出可用的关机 KPI 数据

ls /home/lixiang/work/sdata/code/smk-1125/boot_kpi_server/backend/reboot_tests/

分析脚本

使用 skills/boot-kpi-analyzer/scripts/analyze.py 进行自动化分析:

# 分析最新的开机 KPI
python3 /home/lixiang/.openclaw/skills/boot-kpi-analyzer/scripts/analyze.py boot --latest

# 分析指定目录的开机 KPI
python3 /home/lixiang/.openclaw/skills/boot-kpi-analyzer/scripts/analyze.py boot --dir \x3CYYYYMMDD_HHMMSS>

# 分析最新的关机 KPI
python3 /home/lixiang/.openclaw/skills/boot-kpi-analyzer/scripts/analyze.py shutdown --latest

# 分析指定目录的关机 KPI
python3 /home/lixiang/.openclaw/skills/boot-kpi-analyzer/scripts/analyze.py shutdown --dir \x3CYYYYMMDD_HHMMSS>

# 列出所有可用数据
python3 /home/lixiang/.openclaw/skills/boot-kpi-analyzer/scripts/analyze.py list

curl 查询 Web 接口示例

curl -s http://10.122.86.46:9999/
curl -s http://10.122.86.46:9999/api/sessions
curl -s http://10.122.86.46:9999/api/latest

数据格式说明

boot_kpi.log 格式

\x3Cservice_name> -> \x3Cstate> at \x3Cms>ms from system boot

关键状态:activatingactivedeactivatinginactivefailed

shutdown-monitor-units.log 格式

[YYYY-MM-DD HH:MM:SS.mmm] Unit: \x3Cservice> | State: \x3CFROM> -> \x3CTO> | BPF_timestamp: \x3Cns>
  • BPF_timestamp 单位:纳秒
  • 关键里程碑:
    • shutdown.target | State: INACTIVE -> ACTIVE — 关机流程开始
    • umount.target | State: INACTIVE -> ACTIVE — 关机晚期阶段
    • qcrosvm.service | State: ACTIVE -> DEACTIVATING — Android VM 开始关闭

report.json 关键字段

  • reboot_duration: 整个重启周期(秒),含关机+开机
  • test_result: success / failure
  • build_id: 固件版本
  • has_lastlog: 是否有 lastlog(异常重启标志)
  • error_message: 失败原因

分析要点

开机性能关键指标

  • qcrosvm.service 激活耗时:Android VM 启动时间,最重要的 KPI
  • 慢服务(>100ms):影响开机速度的服务
  • 频繁重启的服务:可能有依赖问题
  • 失败服务:需要重点关注

关机性能关键指标

  • 总关机时长:从 shutdown.target 激活到系统关机
  • qcrosvm.service 关机耗时:Android VM 关闭时间
  • reboot_duration:完整重启周期(越小越好,目标通常 \x3C 40s)
  • umount.target 之前的耗时:文件系统卸载前的服务关闭阶段

典型分析流程

  1. 列出数据 → 找到最新或指定时间段的数据目录
  2. 读取 report.json → 快速了解总体情况(reboot_duration、是否成功)
  3. 分析关机日志 → 找出关机慢的服务(计算各服务从 DEACTIVATING 到 INACTIVE 的耗时)
  4. 读取 boot_kpi_summary.txt → 获取开机分析摘要
  5. 深挖 boot_kpi.log → 针对具体服务进行详细分析
  6. 对比多次数据 → 找出性能波动规律
安全使用建议
This skill appears to do exactly what it claims: parse log files under /home/lixiang/... and optionally query a private web API. Before installing or running it: (1) confirm the indicated directories exist and that you want the agent to read them (the paths are hardcoded to /home/lixiang/...); (2) confirm you trust the private IP endpoint (http://10.122.86.46:9999) the skill may curl; (3) review the included script if you need to be certain it doesn't transmit data elsewhere — it appears to only parse local logs; (4) be aware the agent will run python3 and shell curl commands, so run in a principle-of-least-privilege context or on a machine/account that is allowed to expose those logs. If any of these assumptions don't hold (different home path, untrusted network endpoint), do not enable/auto-run the skill until modified.
功能分析
Type: OpenClaw Skill Name: boot-kpi-analyzer Version: 1.0.0 The skill is a specialized performance analysis tool for vehicle boot and shutdown KPIs, designed to parse logs and generate reports. The Python script `analyze.py` uses standard libraries to perform regex-based parsing of local log files located in specific directories under `/home/lixiang/`. While `SKILL.md` instructs the agent to use `execute_command` with `curl` to access an internal web interface (10.122.86.46:9999) because `web_fetch` is restricted, this behavior is transparently documented and directly supports the stated purpose of querying a local KPI server.
能力评估
Purpose & Capability
Name/description describe analysis of boot/shutdown KPI data; the included script and SKILL.md operate on the exact log directories and files described (boot_kpi.log, unit_kpi.log, shutdown-monitor-units.log, report.json). No unrelated services, credentials, or broad system access are requested.
Instruction Scope
Instructions explicitly require reading files under /home/lixiang/... and optionally curling a private IP (http://10.122.86.46:9999). This is consistent with the skill's purpose, but the instructions hardcode a specific user path and instruct the agent to run shell commands (python3 and curl), which means the agent will access local files and make network requests when invoked.
Install Mechanism
No install spec; the skill is instruction+script only. Nothing is downloaded or written to disk at install time beyond the normal skill files, which is the lowest-risk pattern.
Credentials
The skill declares no required environment variables or credentials. Its file- and network-access needs (local log dirs and a private web API) are proportionate to the stated log-analysis purpose.
Persistence & Privilege
always:false (default) and model invocation is enabled (default). Autonomous invocation is the platform default; since the skill reads local files and can run curl/python3, users should be aware an agent could execute these actions autonomously if allowed. There is no always:true or other elevated persistence requested.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install boot-kpi-analyzer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /boot-kpi-analyzer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release — provides tools and documentation for analyzing SS4 vehicle system boot and shutdown KPIs. - Supports automated analysis of boot and shutdown KPI log directories with `analyze.py`. - Documents log file structures and key performance metrics for startup and shutdown. - Includes guidance for listing, selecting, and analyzing specific KPI data sets. - Provides instructions for querying a private web API interface using curl. - Outlines troubleshooting steps and common indicators for performance issues.
元数据
Slug boot-kpi-analyzer
版本 1.0.0
许可证
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Boot Kpi Analyzer 是什么?

分析并定位SS4车机开关机关键性能指标,支持开机慢、关机慢等问题的时序数据自动化分析与报告生成。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 260 次。

如何安装 Boot Kpi Analyzer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install boot-kpi-analyzer」即可一键安装,无需额外配置。

Boot Kpi Analyzer 是免费的吗?

是的,Boot Kpi Analyzer 完全免费(开源免费),可自由下载、安装和使用。

Boot Kpi Analyzer 支持哪些平台?

Boot Kpi Analyzer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Boot Kpi Analyzer?

由 lichm1007(@lichm1007)开发并维护,当前版本 v1.0.0。

💬 留言讨论