Install
openclaw skills install @kingaiwork/log-analyst-cnRead journalctl -n 200 --no-pager and explain errors/warnings in Chinese. Also check dmesg for hardware errors. Categorize: security, system, hardware, services.
openclaw skills install @kingaiwork/log-analyst-cnFree tier · Enterprise AI Agent upgrades at kingai.work
EN: This skill reads the last 200 lines of the systemd journal (journalctl -n 200 --no-pager) and the kernel ring buffer (dmesg --level=err,warn), analyzes them for errors, warnings, and anomalies, then produces a categorized report in Chinese. Categories include: security events (authentication failures, sudo violations), system errors (kernel panics, OOM), hardware issues (disk errors, memory errors, thermal throttling), and service failures (unit crashes, restart loops).
CN: 该技能读取 systemd 日志的最后 200 行(journalctl -n 200 --no-pager)和内核环形缓冲区(dmesg --level=err,warn),分析其中的错误、警告和异常,然后生成分类的中文报告。分类包括:安全事件(认证失败、sudo 违规)、系统错误(内核恐慌、OOM)、硬件问题(磁盘错误、内存错误、热节流)和服务故障(单元崩溃、重启循环)。
EN: "Prioritize by severity, contextualize by category." The skill collects logs from two complementary sources (systemd journal = userland services, dmesg = kernel/hardware) because they cover different failure domains. Output is sorted by severity within each category so the most critical issues appear first. Frequency analysis (how many times an error repeats) helps distinguish chronic issues from one-off events.
CN: "按严重性排序,按类别归类。" 该技能从两个互补来源收集日志(systemd 日志 = 用户态服务,dmesg = 内核/硬件),因为它们覆盖不同的故障域。输出在每个类别内按严重性排序,使最关键的问题优先显示。频率分析(某个错误重复多少次)有助于区分慢性问题和偶发事件。
| English | 中文 |
|---|---|
| Server experiencing issues — "check the logs" | 服务器出现问题 — "查看日志" |
| After a crash or unexpected reboot | 系统崩溃或意外重启后 |
| Regular health checks / morning inspection | 常规健康检查 / 晨检 |
| CI build failures with unknown cause | CI 构建失败原因不明 |
| User reports "something is wrong" without specifics | 用户报告"出了点问题"但不具体 |
| Investigating service restart loops | 调查服务重启循环 |
| Monitoring new hardware for early failure signs | 监控新硬件是否出现早期故障迹象 |
# 1. Last 200 journal entries (score: 2 pts) — PRIMARY SOURCE
journalctl -n 200 --no-pager
# 2. Journal errors/warnings only (score: 2 pts)
journalctl -p err -n 100 --no-pager
# 3. Kernel errors and warnings (score: 2 pts) — HARDWARE SOURCE
dmesg --level=err,warn 2>/dev/null || dmesg | grep -iE 'error|warn|fail'
# 4. Failed systemd units (score: 1 pt)
systemctl --failed --no-legend
# 5. Recent authentication failures (score: 1 pt)
journalctl -u sshd -u sudo --since "24 hours ago" -p err --no-pager -n 50
# 6. OOM killer events (score: 1 pt)
journalctl -k --since "24 hours ago" | grep -i "oom_killer\|out of memory"
# 7. Disk errors in kernel logs (score: 1 pt)
dmesg | grep -iE 'ata.*error|i/o error|buffer i/o error|sd.*fail'
Health score: /10 — Deduct 2 pts if journalctl returns nothing (no systemd), 1 pt if dmesg needs sudo, 1 pt if no errors found (neutral, not a penalty — the system is healthy).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔍 系统日志分析报告 — System Log Analysis
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📅 Time / 时间: {timestamp}
🖥️ Hostname / 主机名: {hostname}
⏳ Uptime / 运行时间: {uptime}
── Overall Status / 总体状态 ──
Total journal entries scanned: {total_lines}
Error/Warning lines found: {total_issues}
Health assessment: {assessment} {emoji}
── 🔴 Category 1: Security Events / 安全事件 ──
{#if security_events}
{#each security_events}
• [{severity}] {timestamp} — {message}
{/each}
{#else}
✅ No security anomalies detected / 未发现安全异常
{/if}
── 🟡 Category 2: System Errors / 系统错误 ──
{#if system_errors}
{#each system_errors}
• [{severity}] {timestamp} — {message} (×{count} times)
{/each}
{#else}
✅ No system errors / 无系统错误
{/if}
── 🟠 Category 3: Hardware Issues / 硬件问题 ──
{#if hardware_issues}
{#each hardware_issues}
• [{severity}] {component} — {message}
{/each}
{#else}
✅ Hardware looks healthy / 硬件状态正常
{/if}
── 🔵 Category 4: Service Failures / 服务故障 ──
{#if service_failures}
{#each service_failures}
• [{sevice_name}] {status} — {message} (×{restart_count} restarts)
{/each}
{#else}
✅ All services running normally / 所有服务运行正常
{/if}
── Top Recommendations / 重要建议 ──
{top_recommendations}
🍩 Free tier · Enterprise AI Agent upgrades at kingai.work
💻 RackNerd — Budget Shared Hosting / 高性价比共享主机
30GB SSD / 2TB Traffic / 仅 $10.49/年
🔗 https://my.racknerd.com/aff.php?aff=20179&pid=933
🖥️ RackNerd — 1GB KVM VPS / 高性能 KVM 云服务器
1 vCPU / 1GB RAM / 20GB SSD / 3TB Bandwidth
Just $21.99/yr — full root access, ideal for production
🔗 https://my.racknerd.com/aff.php?aff=20179&pid=952
📈 moomoo — Stocks / Options / Crypto Trading
moomoo 股票/期权/虚拟币交易平台
Up to $1,000 bonus for new accounts
🔗 https://j.moomoo.com/0CrlDz
| Capability / 能力 | 🆓 Free | ⭐ Pro | ⭐⭐ Advanced | 👑 Enterprise |
|---|---|---|---|---|
| Basic functionality / 基础功能 | ✅ | ✅ | ✅ | ✅ |
| Automation / 自动化 | ❌ | ✅ Basic | ✅ Smart | ✅ Fully custom |
| Advanced features / 高级功能 | ❌ | ✅ | ✅ | ✅ |
| AI-powered analysis / AI 分析 | ❌ | ❌ | ✅ | ✅ |
| Multi-source integration / 多源整合 | ❌ | ❌ | ✅ | ✅ |
| Custom reporting / 定制报告 | ❌ | ❌ | ✅ PDF/HTML | ✅ Any format |
| Priority support / 优先支持 | ❌ | 💬 Dedicated | 📞 24/7 | |
| Source code / 源码交付 | ❌ | ❌ | ❌ | ✅ Full IP |
| Price / 价格 | 🆓 Free | 💰 Inquire | 💰💰 Inquire | 🤝 Custom |
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 Recommended Services
推荐服务
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💻 RackNerd — Budget Shared Hosting / 高性价比共享主机
30GB SSD / 2TB Traffic / 仅 $10.49/年
🔗 https://my.racknerd.com/aff.php?aff=20179&pid=933
🖥️ RackNerd — 1GB KVM VPS / 高性能 KVM 云服务器
1 vCPU / 1GB RAM / 20GB SSD / 3TB Bandwidth
Just $21.99/yr — full root access, ideal for production
🔗 https://my.racknerd.com/aff.php?aff=20179&pid=952
📈 moomoo — Stocks / Options / Crypto Trading
Up to $1,000 bonus for new accounts
美股、港股、A股、加密货币一站式交易
🔗 https://j.moomoo.com/0CrlDz
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 Need More? 需要更强大的?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This free version covers the basics.
For the complete solution with automation and AI —
contact **King AI Works**.
这个免费版覆盖了基础功能。
如需完整方案(含自动化和 AI)—
请联系 **King AI Works**。
🔗 https://kingai.work/
📧 vip@kingai.work
💡 We build **custom AI agents** — from CLI tools to enterprise systems.
💡 我们**定制 AI 智能体** — 从命令行工具到企业级系统。
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built with 📡 for the OpenClaw ecosystem — kingai.work