Huawei Device Inspector

# 华为设备巡检技能

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "Huawei Device Inspector" with this command: npx skills add v585/huawei-device-inspector

华为设备巡检技能

技能描述

通过SSH连接华为交换机/路由器,自动执行状态检查、告警查询、安全风险排查,生成巡检报告。

触发关键词

  • 华为巡检
  • 交换机状态
  • 路由器检查
  • 设备巡检
  • 华为设备状态

设备信息

S7703S 核心交换机

  • 管理地址:192.168.255.253
  • 用户名:openclaw
  • 密码:openclaw@2026

AR6280-S 路由器

  • 管理地址:192.168.255.254
  • 用户名:openclaw
  • 密码:openclaw@2026

执行步骤

1. 建立SSH连接

使用pexpect建立交互式SSH连接(华为设备直接SSH会被断开):

import pexpect

def connect_device(host, username, password):
    child = pexpect.spawn(f'ssh -o StrictHostKeyChecking=no {username}@{host}', timeout=60)
    child.expect(['password:', 'Password:'], timeout=10)
    child.sendline(password)
    child.expect(['>', '#'], timeout=15)
    return child

2. 执行巡检命令

按顺序执行以下命令收集信息:

命令用途
display version系统版本、运行时间
display device硬件状态
display cpu-usageCPU使用率
display memory-usage内存使用率
display alarm active活动告警
display temperature all温度状态
display power电源状态
display fan风扇状态
display anti-attack statistics攻击防御统计

3. 解析告警信息

重点关注以下告警类型:

告警名称级别说明
hwSysSecureRiskWarningWarning安全风险警告
hwGtlDefaultValueMajorLicense未激活
hwLdtPortLoopDetectWarning端口环路检测
linkDownCritical接口断开

4. 生成巡检报告

报告包含:

  • 基本信息(型号、版本、运行时间)
  • 硬件状态(板卡、电源、风扇、温度)
  • 资源使用(CPU、内存)
  • 活动告警列表
  • 问题总结和建议

输出格式

## 华为 [型号] 巡检报告

### 基本信息
| 项目 | 状态 |
|------|------|
| 型号 | xxx |
| 系统版本 | xxx |
| 运行时间 | xxx |

### 硬件状态
| 组件 | 状态 |
|------|------|
| 主控板 | Normal |
| 电源 | Normal |
| 风扇 | Normal |
| 温度 | xx°C |

### 资源使用
| 指标 | 当前值 | 状态 |
|------|--------|------|
| CPU | xx% | ✅/⚠️ |
| 内存 | xx% | ✅/⚠️ |

### 活动告警
| 级别 | 告警 | 说明 |
|------|------|------|
| Warning | xxx | xxx |

### 问题总结
1. xxx
2. xxx

适用场景

  1. 日常巡检 — 定期检查设备健康状态
  2. 故障排查 — 设备异常时快速定位问题
  3. 安全审计 — 检查安全风险和攻击防御情况

注意事项

  1. 华为设备SSH连接需要使用pexpect,直接SSH会被断开
  2. 命令输出可能有分页(---- More ----),需要发送空格继续
  3. 告警级别:Critical > Major > Warning
  4. CPU使用率持续>70%需要关注
  5. 端口环路告警需要立即处理

依赖

  • Python3 + pexpect
  • sshpass(可选,用于简单命令)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

通义晓蜜 - 智能外呼

触发阿里云晓蜜外呼机器人任务,自动批量拨打电话。适用于批量外呼、客户回访、满意度调查、简历筛查约面试等场景。可从前置工具或节点获取外呼名单。

Registry SourceRecently Updated
General

Letterboxd Watchlist

Scrape a public Letterboxd user's watchlist into a CSV/JSONL list of titles and film URLs without logging in. Use when a user asks to export, scrape, or mirror a Letterboxd watchlist, or to build watch-next queues.

Registry SourceRecently Updated
General

Seedance Video Generation

Generate AI videos using ByteDance Seedance. Use when the user wants to: (1) generate videos from text prompts, (2) generate videos from images (first frame, first+last frame, reference images), or (3) query/manage video generation tasks. Supports Seedance 1.5 Pro (with audio), 1.0 Pro, 1.0 Pro Fast, and 1.0 Lite models.

Registry SourceRecently Updated
4.2K17jackycser
General

Universal Skills Manager

The master coordinator for AI skills. Discovers skills from multiple sources (SkillsMP.com, SkillHub, and ClawHub), manages installation, and synchronization...

Registry SourceRecently Updated