← Back to Skills Marketplace
lichm1007

Boot Kpi Analyzer

by lichm1007 · GitHub ↗ · v1.0.0
cross-platform ✓ Security Clean
260
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install boot-kpi-analyzer
Description
分析并定位SS4车机开关机关键性能指标,支持开机慢、关机慢等问题的时序数据自动化分析与报告生成。
README (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. 对比多次数据 → 找出性能波动规律
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install boot-kpi-analyzer
  3. After installation, invoke the skill by name or use /boot-kpi-analyzer
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug boot-kpi-analyzer
Version 1.0.0
License
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Boot Kpi Analyzer?

分析并定位SS4车机开关机关键性能指标,支持开机慢、关机慢等问题的时序数据自动化分析与报告生成。 It is an AI Agent Skill for Claude Code / OpenClaw, with 260 downloads so far.

How do I install Boot Kpi Analyzer?

Run "/install boot-kpi-analyzer" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Boot Kpi Analyzer free?

Yes, Boot Kpi Analyzer is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Boot Kpi Analyzer support?

Boot Kpi Analyzer is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Boot Kpi Analyzer?

It is built and maintained by lichm1007 (@lichm1007); the current version is v1.0.0.

💬 Comments