当前位置: 首页 > Skill >

Olares Dashboard (olares-cli dashboard)

Olares Dashboard (olares-cli dashboard)

Olares Dashboard (olares-cli dashboard)

Olares Dashboard(olares‑cli dashboard)— 通过命令行查询 Olares Dashboard SPA 的概览与应用路由,限定在当前活动的 Olare 实例。

4.0.1 2026.11.25 973
获取Skill文件查看使用说明
作 者:周景 许可证: 更新时间:2026.11.25
本文目录展开

dashboard (overview + applications, AI-agent first)

CRITICAL — before doing anything, MUST use the Read tool to read ../olares-shared/SKILL.md for profile selection, login, automatic token refresh, and the auth-error recovery table.

Source of truth for flags is always olares-cli dashboard --help (global flags) and olares-cli dashboard <verb> --help (per-leaf flags). This file only carries what --help cannot give: the dual-shape JSON envelope contract, three-state empty-data semantics, capability gates, watch / window rules, and the verb index.

Routing

This subtree is an AI-agent-first JSON mirror of the Olares Dashboard SPA's Overview and Applications routes. Use it when:

  • The user asks for runtime metrics: CPU / memory / disk / pods / network / fan / GPU.
  • The user wants the workload-grain or application-grain resource ranking.
  • The user wants the JSON form of what the SPA Overview / Applications pages show.
  • The user wants --watch for live-tailing one of the above.

Sibling-skill routing:

User intent Use instead
"What pods / workloads / nodes / namespaces exist?" (object inventory) olares-cluster
"Install / start / stop an Olares app" olares-market
"Configure my user settings" olares-settings
"Browse files / drives" olares-files

Mental model: dashboard answers "what's the resource usage and health". For inventory and lifecycle, route elsewhere.

JSON envelope (two shapes, frozen)

Every command emits exactly one of two shapes. The choice is fixed per command. Agents pin on kind and meta.empty_reason; the CLI does not change these values across releases.

Shape A — leaf items

{
  "kind": "dashboard.<area>.<verb>",
  "meta": {
    "fetched_at": "...",
    "iteration": 0,
    "recommended_poll_seconds": 60,
    "empty": false,
    "empty_reason": "",
    "error": "",
    "http_status": 200
  },
  "items": [
    { "raw": { /* upstream wire shape */ }, "display": { /* table-friendly strings */ } }
  ]
}
  • raw is the canonical machine-friendly shape — numbers as numbers, timestamps as Unix seconds, temperatures as raw Celsius. Agents pin on raw.
  • display is human-presentation only, formatted with current --temp-unit / --timezone. Agents MUST NOT pin on display — it can change with locale or format fixes.
  • meta.recommended_poll_seconds — the page-level cadence the SPA uses; respect it when driving --watch.
  • meta.iteration — 1-based, present in every --watch payload.

Shape B — sections envelope

Used by parent commands that aggregate multiple sub-views:

Parent command Sections
dashboard overview physical / user / ranking
dashboard overview disk main / partitions
dashboard overview fan live / curve
dashboard overview gpu graphics / tasks
{
  "kind": "dashboard.overview",
  "meta": {...},
  "sections": {
    "physical": { "kind": "dashboard.overview.physical", "meta": {...}, "items": [...] },
    "user":     { "kind": "dashboard.overview.user",     "meta": {...}, "items": [...] },
    "ranking":  { "kind": "dashboard.overview.ranking",  "meta": {...}, "items": [...] }
  }
}

Sections are fetched concurrently. A single failed section degrades to meta.error="..." on that section — the others still return. Surface partial outputs to the user, don't blackout the whole envelope.

To enumerate every kind live: olares-cli dashboard schema -o json.

Three-state empty data (meta.empty_reason)

Optional hardware (GPU / fan) and optional integrations have three legitimate "empty" states. The CLI distinguishes them so agents can branch without parsing prose.

Upstream meta.empty meta.empty_reason Meaning
HTTP 404 true no_<feature>_integration Integration absent (e.g. HAMI vGPU not installed)
HTTP 200, empty body true no_<feature>_detected Integration present but hardware empty
HTTP 200, non-empty false "" Normal — items[] populated
Any 4xx / 5xx n/a (envelope meta.error) n/a Real failure

Forbidden: turning a 404 into an error, or merging the two reasons into a single "empty=true" string. Agents currently key on the reason.

Specific reason values:

Reason Where
not_olares_one fan default / live / curve (active device's device_name is not Olares One)
no_fan_integration fan live (HTTP 404 fallback)
no_vgpu_integration gpu list / tasks / get / task (HTTP 404)
vgpu_unavailable gpu list / tasks / get / task (HTTP 5xx); meta.error carries the upstream message, meta.http_status the original status
no_gpu_detected gpu list / tasks / get / task (HTTP 200, empty body)

Capability gates

The fan / GPU subtrees mirror SPA gates, but with two different strengths.

Hard gate — fan (Olares One only)

overview fan * returns an empty envelope BEFORE any fetch on non-Olares-One hardware:

{
  "kind": "dashboard.overview.fan.live",
  "meta": {
    "empty": true,
    "empty_reason": "not_olares_one",
    "note": "Fan / cooling integration is only available on Olares One devices",
    "device_name": "DIY-PC"
  },
  "items": []
}

Exit code is still 0 — this is a predictable state, not a failure.

Soft gate — GPU (advisory)

The CLI ALWAYS calls HAMI for GPU verbs. The SPA-equivalent "would-have-been-hidden" reason is recorded as meta.note and (in table mode) as a one-liner on stderr. The actual meta.empty / empty_reason are decided by HAMI's response.

Advisories you may see in meta.note:

  • GPU sidebar entry is hidden for non-admin profiles in the SPA; HAMI was queried directly
  • no node carries gpu.bytetrade.io/cuda-supported=true; SPA hides the GPU card. HAMI was queried directly

When BOTH a HAMI failure AND a soft advisory apply, meta.note is "<advisory> | <hami-explanation>".

Agent decision tree (recommended)

inspect meta.empty + meta.empty_reason + meta.note →
  not_olares_one        → skip the fan subtree on this device
  no_*_integration      → upstream component absent (HAMI / capi system fan)
  vgpu_unavailable      → transient: retry; check meta.http_status / meta.error
  no_*_detected         → integration up but hardware empty
  (none) + meta.note    → data is present but the SPA would have hidden the entry; surface the note to the user
  (none) + (no note)    → items[] populated, proceed normally

Verb index

For flags & examples, always start with olares-cli dashboard <verb> --help.

Verb Purpose --help first, then...
applications (alias apps) Workload-grain application table (mirrors SPA Applications page) olares-cli dashboard applications --help
overview (no subverb) Default sections envelope (physical + user + ranking) references/olares-dashboard-overview.md
overview <section> Per-section snapshot (10 sub-verbs: cpu / memory / disk / pods / network / fan / gpu / physical / user / ranking) references/olares-dashboard-overview.md
schema Introspect the JSON Schemas served by olares-cli dashboard olares-cli dashboard schema --help

For --watch, --since / --start/--end, --user, --timezone, and the NDJSON contract, see references/olares-dashboard-watch.md.

Global flags (cross-cutting)

These are bound on the dashboard root and inherited by every leaf. Defaults are sensible — don't pass them unless the user explicitly asks for the non-default.

Flag Purpose
-o, --output table|json Output format (default table). JSON is the agent-facing form
--head N Truncate to the first N rows after sorting (0 = no truncation)
--limit N / --page N Pagination knobs (0 = upstream defaults)
--since D Relative window (e.g. 5m, 1h). Sliding when --watch
--start <RFC3339> / --end <RFC3339> Absolute window. Fixed across iterations when --watch. Mutually exclusive with --since
--temp-unit C|F|K Display unit for temperature (JSON raw always Celsius)
--timezone <IANA> Display TZ for table rendering (does NOT affect wire-format TZ)
--user <olaresId> Target a different user than the active profile — platform-admin only, returns 403 otherwise
--watch Enable HTTP-polling loop (NDJSON per iteration in JSON mode)
--watch-interval D / --watch-iterations N / --watch-timeout D Watch-loop knobs (require --watch; rejected otherwise)

Exit codes & error semantics

  • Exit 0 for every gated / advisory / empty path — these are predictable states, not failures.
  • Exit non-zero only on:
    • Auth-class errors (ErrTokenInvalidated / ErrNotLoggedIn) — propagated immediately
    • 3 consecutive iteration failures inside a --watch loop
    • A real upstream meta.error on a one-shot invocation
  • Stderr carries one human-readable line in non-JSON modes. JSON / NDJSON modes stay silent on stderr — agents read stdout exclusively.

Common errors

Symptom Cause Fix
fan is only available on Olares One devices (current: <device_name>) (stderr) Hard gate; meta.empty_reason=not_olares_one Stop probing fan on this device
(advisory) GPU sidebar entry is hidden for non-admin profiles ... (stderr) Soft gate; data still returned Surface to user as a note; don't treat as error
gpu data temporarily unavailable: HAMI returned HTTP 500 vgpu_unavailable; transient Retry; if persistent, file a server-side issue
--user requires platform-admin role Non-admin profile passing --user Use the active profile, or switch with olares-cli profile use
--watch-iterations requires --watch (or --interval / --timeout similarly) Polling knob without gate flag Add --watch or drop the knob
--since and --start/--end are mutually exclusive Both window forms set Pick one
401/403 from any dashboard verb Token rotation / invalidation See ../olares-shared/SKILL.md

For the full auth-error matrix see ../olares-shared/SKILL.md.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,034
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,018
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,017
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,013
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,013
Skill 文件
  • SKILL.md
    • dashboard (overview + applications, AI-agent first)
    • Routing
    • JSON envelope (two shapes, frozen)
      • Shape A — leaf items
      • Shape B — sections envelope
    • Three-state empty data (meta.empty_reason)
    • Capability gates
      • Hard gate — fan (Olares One only)
      • Soft gate — GPU (advisory)
    • Agent decision tree (recommended)
    • Verb index
    • Global flags (cross-cutting)
    • Exit codes & error semantics
    • Common errors
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期