AGENT SKILL
machine-environment-inspection
Check the host machine: hardware, virtualization, GPUs.
- License 许可
- MIT
- 最近更新
- 2026-08-19
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- machine-environment-inspection
- license
- MIT
- version
- 1.0.0
- metadata
- { "hermes": { "tags": [ "environment", "hardware", "gpu", "lspci", "mx-smi", "hostnamectl", "inspection" ] } }
- description
- Check the host machine: hardware, virtualization, GPUs.
03 SKILL.md 正文
Machine Environment Inspection
Use when asked "what machine are you on / 机器环境 / 看下环境 / 检查运行环境", before claiming the host type (cloud vs physical), or when planning resource-dependent work (GPU training/inference).
Procedure
- OS & kernel:
uname -a,. /etc/os-release && echo $PRETTY_NAME - Hardware identity (physical vs VM/cloud):
hostnamectl— shows Hardware Vendor + Model (e.g. "New H3C Technologies ... UniServer R5300 G6")systemd-detect-virt—none= bare metal;kvm/docker/wslotherwisels /.dockerenvandgrep -i microsoft /proc/version(container/WSL probes)
- Scale:
nproc(threads),free -h,df -h /,uptime,hostname - GPU / compute accelerators:
lspci | grep -iE "vga|3d|display"— many display controllers = GPU server- Unknown vendor IDs (e.g.
9999:4040):lspci -vnn -s <slot>→ read "Kernel driver in use" and "Kernel modules" (e.g.metax). Confirm identity via the kernel module, not the ID alone. - Driver dirs:
ls /usr/local/formetax,Ascend,cambricon,iluvatar,maca,musa,corex - Loaded modules:
lsmod | grep -iE "metax|iluvatar|cambricon|ascend|maca" - MetaX cards:
mx-smi(MetaX's nvidia-smi equivalent, at /usr/bin/mx-smi) → card count, model, per-GPU memory/util, kernel driver & MACA versions.
- Running compute workloads:
ps aux | grep -E "sglang|vllm|python"— identify inference/training services; themx-smi(or nvidia-smi) process section maps PIDs → GPU. The service's own command line (sglang serve --model-path ... --tp N --nnodes M) reveals model, quantization, tensor parallelism, and cluster topology.
Pitfalls
- NEVER guess the cloud provider from the username —
ecs-userlooked like Alibaba ECS, but the box was a physical H3C UniServer R5300 G6. Verify withhostnamectl+systemd-detect-virt. - Vendor ID 9999 = MetaX (沐曦), not NVIDIA (10de). On MetaX boxes
nvidia-smidoes not exist —mx-smiis the tool. Other Chinese GPU vendors to sniff for: Ascend 19e5, Cambricon 1d94, Moore Threads 1f90, Iluvatar 1f07 — always confirm with the loaded kernel module. hostname -Ireturns the first NIC IP only; multi-node clusters use a different dist-init address (e.g.--dist-init-addr), so don't equate the box's IP with the cluster endpoint.- GPU memory can read ~full with 0% util when an inference service (sglang scheduler processes) holds weights in VRAM — check the process section before concluding the GPUs are busy.
04 同仓库更多 Skills
jekyll-chirpy-blog
Use when editing the Jekyll/Chirpy blog or fixing mermaid.
★ 0
test-driven-development
TDD: enforce RED-GREEN-REFACTOR, tests before code.
★ 0
systematic-debugging
4-phase root cause debugging: understand bugs before fixing.
★ 0
spike
Throwaway experiments to validate an idea before build.
★ 0
simplify-code
Parallel 4-agent cleanup of recent code changes.
★ 0
requesting-code-review
Pre-commit review: security scan, quality gates, auto-fix.
★ 0