📦 Alibabacloud Ecs Gpu Diagnosis — 技能工具

v0.0.1-beta.1

Diagnose Alibaba Cloud ECS GPU instances to detect GPU device status, driver issues, and hardware failures. Use this Skill when users report GPU instance ano...

0· 30·0 当前·0 累计
sdk-team 头像by @sdk-team (alibabacloud-skills-team)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/4/16
0
安全扫描
VirusTotal
可疑
查看报告
OpenClaw
可疑
high confidence
The skill's runtime instructions legitimately require Alibaba Cloud CLI credentials, but the skill metadata does not declare or request those credentials — this mismatch and the agent-autonomous invocation capability are concerning and merit caution before installing.
评估建议
What to consider before installing: - The skill will run Alibaba Cloud CLI commands that use your Alibaba Cloud AccessKey (configured via `aliyun configure`). The registry metadata does not declare those credentials — verify you are comfortable with an installed skill that expects to use your cloud credentials. - Prefer to run this skill only with an account or RAM user that has limited, scoped permissions (the references/ram-policies.md lists ecs:CreateDiagnosticReport, ecs:DescribeDiagnosticR...
详细分析 ▾
用途与能力
The skill's stated purpose (diagnosing Alibaba Cloud ECS GPU instances) aligns with the commands and APIs used (aliyun ecs CreateDiagnosticReport, DescribeDiagnosticReports, DescribeInstances, DescribeRegions). However, the SKILL.md repeatedly requires an Alibaba Cloud AccessKey/CLI configuration while the registry metadata lists no required env vars or primary credential. A diagnostic skill that runs cloud APIs legitimately needs cloud credentials; failing to declare them in metadata is an inconsistency.
指令范围
The SKILL.md instructs the agent to run aliyun CLI commands that will use the user's Alibaba Cloud credentials (via configured CLI). All referenced actions (installation guidance, region validation, instance queries, creating and polling diagnostic reports) are within the stated purpose. Still, the instructions explicitly require the user’s AccessKey and to run CLI commands; this access to cloud credentials is not documented in the skill's declared requirements, which is a scope/visibility concern.
安装机制
This is an instruction-only skill (no install spec, no code files). The included installation references use official Alibaba Cloud CLI URLs hosted on aliyuncli.alicdn.com and Homebrew; those are expected and not suspicious. No arbitrary or obfuscated download hosts are present.
凭证需求
The runtime requires the Alibaba Cloud CLI to be configured with AccessKey credentials and appropriate RAM permissions, but requires.env and primary credential fields in the registry metadata are empty. The skill therefore omits declaring sensitive credentials it will depend on; this mismatch reduces transparency and prevents automatic least-privilege checks.
持久化与权限
The skill does not request permanent presence (always:false) and does not include install-time scripts, so it does not appear to request elevated persistence. However, disable-model-invocation is false (normal) which means the agent could invoke the skill autonomously; combined with access to cloud credentials (see above), autonomous invocation increases risk if you allow the agent to run without supervision.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv0.0.1-beta.12026/4/16

Initial beta release: Diagnose Alibaba Cloud ECS GPU instances, check device/drivers, and report hardware issues. - Guides users through checking prerequisites (Alibaba Cloud CLI, permissions) and gathering input parameters (instance ID, region). - Validates instance ID and region, and ensures only supported Linux OS is diagnosed. - Automates creation of GPU diagnostic reports and polling for results. - Provides clear output summarizing GPU status, discovered issues, and recommended remediation measures. - Includes detailed mapping of diagnostic issues to user instructions and special reminders for O&M notifications.

可疑

安装命令

点击复制
官方npx clawhub@latest install alibabacloud-ecs-gpu-diagnosis
镜像加速npx clawhub@latest install alibabacloud-ecs-gpu-diagnosis --registry https://cn.longxiaskill.com

技能文档

Usage Instructions

Initiate diagnosis on a specified ECS GPU instance to detect GPU device status and output diagnosis results.

Execution Constraints

  • All steps MUST be executed in order; skipping steps is NOT permitted
  • Each step MUST be verified as successful before proceeding to the next
  • Inform the user of the current step being executed
  • If any step fails, user confirmation MUST be obtained before continuing

Prerequisites

  • Check Alibaba Cloud CLI Environment
- Execute which aliyun or aliyun --version to check if CLI is installed - If not installed, inform the user that Alibaba Cloud CLI needs to be installed and provide installation guidance from references/cli-installation.md: - macOS: Homebrew installation or manual installation (Intel/Apple Silicon) - Linux: Download installation package for corresponding architecture (x86_64/ARM64) - Windows: Download installation package and configure PATH, or use PowerShell installation - After installation, run aliyun version to confirm version >= 3.0.299 - Confirm CLI is configured with AccessKey: aliyun configure - Permission Reminder: Remind the user that the current RAM user needs the permissions to execute GPU diagnosis from references/ram-policies.md :

  • Obtain Required Parameters
- Check if INSTANCE_ID is provided (ECS instance ID, format MUST match this regular expression ^i-[a-z0-9]{20}$ ) - Check if REGION_ID is provided (region ID, like cn-shanghai) - If either parameter is missing, ask the user: - "Please provide the ECS instance ID to diagnose (format: i-bp1xxxxx)" - "Please provide the region ID where the instance is located (e.g., cn-shanghai, cn-hangzhou)"

  • Validate Parameters
- Validate INSTANCE_ID format: Check if INSTANCE_ID matches the regex pattern ^i-[a-z0-9]{20}$ - If validation fails, inform the user: "Invalid instance ID format. Instance ID must match the pattern ^i-[a-z0-9]{20}$" - Validate REGION_ID: Query available regions using DescribeRegions API to verify the region is valid:
     aliyun ecs DescribeRegions --user-agent AlibabaCloud-Agent-Skills
     
- Extract the Regions.Region[].RegionId list from the response - Check if the provided REGION_ID exists in the list - If region is invalid, inform the user: "Invalid region ID. Please provide a valid region ID from the available regions list."

  • Check Instance Operating System Type
- Before creating a diagnosis report, query instance information to confirm the OS type:
     aliyun ecs DescribeInstances  --user-agent AlibabaCloud-Agent-Skills --RegionId ${REGION_ID} --InstanceIds '["${INSTANCE_ID}"]'
     
- Extract the Instances.Instance[0].OSType field from the response - If OSType is "linux": Continue with the subsequent diagnosis process - If OSType is not "linux": Notify the user and terminate the process:
     The current instance ${INSTANCE_ID} has operating system ${OSType}.
     This Skill currently only supports Linux operating system instances, other operating systems are not supported.
     No further diagnosis process is needed.
     

Execute Diagnosis

  • Create Diagnostic Report

Use the following command to initiate GPU diagnosis:

   aliyun ecs CreateDiagnosticReport \
     --user-agent AlibabaCloud-Agent-Skills \
     --RegionId '${REGION_ID}' \
     --ResourceId '${INSTANCE_ID}' \
     --MetricSetId 'dms-instanceGPUdevice' \
     --output cols=ReportId
   

Extract ReportId from the output and save it for subsequent queries.

  • Poll Diagnostic Results

Use the following command to query the diagnosis report status:

   aliyun ecs DescribeDiagnosticReports \
     --user-agent AlibabaCloud-Agent-Skills \
     --RegionId '${REGION_ID}' \
     --ReportIds.1 '${REPORT_ID}'
   

Handle based on the returned Status field:

- Status = "Finished": Diagnosis complete, parse the Issues field content - If Issues is empty or does not exist, report "GPU diagnosis normal, no anomalies detected" - If Issues contains content, extract each Issue's IssueId, MetricId, Severity, and MetricCategory, and output diagnosis results and recommended actions according to the IssueId mapping table below - Status = "InProgress": Diagnosis in progress, wait 5 seconds before querying again - Status = "Failed": Diagnosis failed, report the failure status to the user

Set timeout mechanism: poll up to 60 times (approximately 5 minutes), if still not complete, prompt the user to query manually later.

Output Description

After diagnosis is complete, the output should include:

  • Instance ID and region
  • Diagnostic report ID
  • GPU device status summary
  • Discovered Issues (if any)
  • Recommended remediation measures (inferred from Issues content)

Diagnostic Result Analysis

The Issues returned in the diagnosis report is an array, where each Issue contains IssueId, MetricId, Severity, and MetricCategory fields. Output diagnosis description and handling measures according to the IssueId mapping table below:

IssueIdDiagnostic DescriptionException Handling Measures
GuestOS.GPU.MemoryEccCheckErrorDetect GPU Double Bit Error conditionsPrompt user to restart instance based on error count
GuestOS.GPU.InfoRomCorruptedDetect GPU infoROM firmware informationO&M notification will be sent to user
GuestOS.GPU.DriverVersionMismatchDetect driver anomalies caused by Kernel upgradesUser needs to uninstall and reinstall driver
GuestOS.GPU.FabricmanagerCheckDetect Fabricmanager component running statusUser needs to install or start Fabricmanager component service
GuestOS.GPU.PowerCableErrorDetect GPU power cable and power supply statusO&M notification will be sent to user
GuestOS.GPU.DeviceLostDetect GPU card loss conditionsO&M notification will be sent to user
GuestOS.GPU.DriverNotInstalledDetect GPU driver installation statusUser needs to install driver
GuestOS.GPU.NVXidErrorDetect GPU Xid error anomaliesPrompt user to restart instance based on different XID errors
GuestOS.GPU.RmInitAdapterErrorDetect GPU card initialization anomalies, manifested as driver card lossO&M notification will be sent to user
GuestOS.GPU.NVLinkErrorCheck GPU NVlink statusO&M notification will be sent to user
Output Format Example:

Diagnosis Complete! Instance: i-bp1xxxxxxxxx (cn-shanghai)
Report ID: dr-xxxxxxxx

1 anomaly found:

[1] GuestOS.GPU.DriverNotInstalled Severity: Warn Diagnostic Description: Detect GPU driver installation status Handling Measures: User needs to install driver

Diagnostic Recommendations:

  • Please install the corresponding version of NVIDIA GPU driver
  • Installation Guide: https://help.aliyun.com/document_detail/108460.html

Special Reminder: When the exception handling measure is "O&M notification will be sent to user", append the following reminder to the output:

⚠️ Important Reminder:
  • Alibaba Cloud will send you O&M event notifications
  • Please go to the ECS console to view event details
  • Pay attention to whether you receive O&M events and handle them as required

If Issues is an empty array or does not exist, output:

Diagnosis Complete! Instance: i-bp1xxxxxxxxx (cn-shanghai)
Report ID: dr-xxxxxxxx

GPU diagnosis normal, no anomalies detected.

Edge Case Handling

  • Instance does not exist: CLI will return an error, capture and inform the user that the instance ID may be incorrect
  • Region error: Prompt user to confirm the region where the instance is located
  • Non-GPU specification: If the instance is not a GPU specification, diagnosis may have no results, prompt user to confirm instance type
  • Insufficient permissions: If permission error is returned, prompt user to check AccessKey permissions
  • Network timeout: Set command execution timeout (recommended 30 seconds), retry after timeout or prompt user to check network

Example Workflow

User: Help me diagnose this GPU server i-bp1xxxxxxxxx

Agent:

  • Check CLI is installed
  • Ask for region (user did not provide)
  • User replies: cn-shanghai
  • Check instance OS type is Linux
  • Execute CreateDiagnosticReport, get ReportId: dr-xxxxxxxx
  • Poll DescribeDiagnosticReports
  • Status=InProgress, wait 5 seconds...
  • Query again, Status=Finished
  • Output Issues content to user

数据来源ClawHub ↗ · 中文优化:龙虾技能库