SysOM Diagnosis (sysom-diagnosis)
Run diagnostics with ./scripts/osops.sh under sysom-diagnosis/ (skill root). stdout is a JSON envelope. By default it performs a local quick check without cloud invocation; remote deep diagnosis is triggered by --deep-diagnosis (memory domain) or io/net/load subcommands, with built-in environment checks.
Installation
Pre-check: Aliyun CLI >= 3.3.3 required Run
aliyun versionto verify >= 3.3.3. If not installed or version too low, runcurl -fsSL https://aliyuncli.alicdn.com/setup.sh | bashto update. Then [MUST] runaliyun configure set --auto-plugin-install trueto enable automatic plugin installation. Then [MUST] runaliyun plugin updateto ensure local plugins are up-to-date.At the start of the Core Workflow (before any CLI invocation): [MUST] Enable AI-Mode — AI-mode is required for Agent Skill execution.
aliyun configure ai-mode enable aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-sysom-diagnosis"At the end of the workflow (after success or failure): [MUST] Disable AI-Mode — AI-mode must be disabled after skill execution completes.
aliyun configure ai-mode disable
Core Agent Behaviors
- Local first: run memory quick checks first; do not ask for region/instance by default.
- Intent routing:
- Memory domain: high usage/panorama →
memgraph; OOM/oom-killer →oom; Java →javamem; unknown →classify. See memory-routing.md. - Non-memory domain: IO/network/load → use corresponding
io/net/loadsubcommands and go directly to remote deep diagnosis. See non-memory-routing.md. - Hard constraint for remote deep diagnosis: for
--deep-diagnosis,io/*,net/*, andload/*, SysOMInvokeDiagnosismust be triggered via./scripts/osops.sh; do not degrade to generic ECS diagnostics APIs or manualEcs.RunCommand/Cloud Assistant collection (top/ps/iostat) as replacements.
- Memory domain: high usage/panorama →
- Follow envelope instructions: always read
agent.summaryand executeagent.next. Quick output is signal detection only. Ifagent.nextcontains a command, execute it before summarizing to the user. - Envelope is source of truth: base conclusions on envelope
data; no extra ad-hoc collection is needed. - Latency + socket queue backlog: if
net netjitter/net packetdrophas been run and looks normal butssshows high Send-Q/Recv-Q, cross-check withmemory memgraph --deep-diagnosis.
For full conventions (execution directory, credential safety, precheck noise reduction, etc.), see agent-conventions.md.
Envelope Output
CLI stdout is a JSON envelope (format: sysom_agent, version: 3.4). The agent directly consumes agent.summary (summary), agent.findings (key metrics), and agent.next (next-step command, executed with Bash in the skill root). Business payload is in data.routing, data.local, and data.remote. See output-format.md.
Precheck / Authentication Failure
On authentication failure, the envelope includes data.remediation (standalone precheck) or data.precheck_gate.remediation (deep-diagnosis merged flow). Guide users according to envelope instructions. See agent-conventions.md.
Subcommand Quick Reference
Memory Domain
| Subcommand | Capability | Reference |
|--------|------|------|
| memory memgraph | Memory panorama/dashboard, including TCP memory and socket queues | memgraph.md |
| memory oom | OOM / oom-killer diagnosis | oomcheck.md |
| memory javamem | Java memory diagnosis | javamem.md |
| memory classify | Comprehensive classification (fallback when uncertain) | Routing: memory-routing.md |
IO Domain
| Subcommand | Capability | Reference |
|--------|------|------|
| io iofsstat | IO dashboard (disk statistics) | iofsstat.md |
| io iodiagnose | Deep IO analysis (slow IO, latency) | iodiagnose.md |
Network Domain
| Subcommand | Capability | Reference |
|--------|------|------|
| net packetdrop | Packet loss (rtrace) | packetdrop.md |
| net netjitter | Jitter (latency fluctuation) | netjitter.md |
Load Domain
| Subcommand | Capability | Reference |
|--------|------|------|
| load delay | Scheduling delay (nosched) | delay.md |
| load loadtask | System load | loadtask.md |
Quick Start
cd <sysom-diagnosis>
./scripts/osops.sh memory classify # local classification
./scripts/osops.sh memory memgraph # local memory panorama
./scripts/osops.sh memory memgraph --deep-diagnosis --channel ecs --timeout 300 # remote memory deep diagnosis
./scripts/osops.sh io iofsstat --channel ecs --timeout 300 # IO dashboard
./scripts/osops.sh net packetdrop --channel ecs --region cn-hangzhou --instance i-xxx # packet loss diagnosis
./scripts/osops.sh load delay --channel ecs --params '{"duration":30}' # scheduling delay
For other instances, add --region <id> --instance <i-xxx>. For first-time setup, run ./scripts/init.sh.
Three Remote OpenAPI Requirements
| Requirement | Description |
|------|------|
| Identity | AK/SK or instance RAM Role |
| Policy | AliyunSysomFullAccess |
| Activation & SLR | Activate SysOM in console; SLR details: service-linked-role-subaccount.md |
Key Path Index
| Need | Document | |------|------| | Memory intent → subcommand mapping | memory-routing.md | | IO/network/load routing | non-memory-routing.md | | Remote invocation contract / CLI options / metadata | invoke-diagnosis.md | | Permissions / credentials / precheck | permission-guide.md → openapi-permission-guide.md | | Envelope output format | output-format.md | | Agent behavior conventions | agent-conventions.md | | Params fields per diagnosis | diagnoses/README.md |
微信扫一扫