linux-server-inspector
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "linux-server-inspector" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-18cdf08ebfcce80fcfdc3e84640e3bd508ddfa33a94f163abb1546699570eba9. Verify the upstream source and version against https://skillhub.cn/skills/user_555dda85/linux-server-inspector before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Collect Linux server resource metrics (CPU, memory, disk, network) and generate multidimensional visual monitoring reports; suitable for batch server inspections, cross-server performance comparisons, and periodic health checks.
Introduction source: third_party · user_555dda85 · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Software, accounts and paid services
- Translation pending; see source documentation.
- Limits and differences
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: linux-server-inspector
description: 采集Linux服务器CPU/内存/磁盘/网络等资源指标,生成多维度可视化监控报告;适用于批量巡检服务器资源、对比多台服务器性能、周期性健康检查等场景
dependency:
python:
- paramiko==3.4.0
- pyyaml==6.0.1
- jinja2==3.1.3
system:
- ssh (SSH客户端,需能访问目标服务器)Linux 服务器巡检监控
任务目标
本 Skill 用于批量巡检 Linux 服务器资源使用情况并生成可视化报告。
- 能力包含:远程服务器指标采集、多维度数据整合、HTML可视化报告生成、周期性/手动触发模式
- 触发条件:用户需要巡检服务器资源、对比服务器性能、定期健康检查
前置准备
- 依赖安装:
pip install paramiko==3.4.0 pyyaml==6.0.1 jinja2==3.1.3 - SSH访问:确保运行环境的 SSH 客户端可访问目标服务器,且已配置服务器登录凭证
- 服务器配置:准备 YAML 格式的服务器列表文件,参见 references/server-config.md
操作步骤
1. 准备服务器配置
创建 servers.yaml 文件,定义要巡检的服务器列表:
servers:
- host: 192.168.1.10
port: 22
username: root
password: "your_password"
os_type: rhel
tags: [web, production]
- host: 192.168.1.20
port: 22
username: admin
password: "your_password"
os_type: debian
tags: [db, production]
2. 执行巡检
手动单次巡检
python scripts/inspect.py --config servers.yaml --output report.html
周期性巡检
# 每5分钟执行一次,持续运行
python scripts/inspect.py --config servers.yaml --output reports/ --interval 300
# 每小时执行一次
python scripts/inspect.py --config servers.yaml --output reports/ --interval 3600
3. 查看报告
生成的 HTML 报告包含:
- 汇总表格:所有服务器关键指标一览
- CPU对比图:各服务器CPU使用率柱状图
- 内存对比图:各服务器内存占用柱状图
- 磁盘详情表:各服务器分区使用率
- 网络带宽:上传/下载速率
- 网络连接数:TCP连接状态统计
使用示例
示例1:基础巡检
- 场景/输入:有3台服务器需要巡检,配置在
prod-servers.yaml - 预期产出:生成
report.html包含所有服务器的监控数据 - 关键要点:确保SSH连接正常,凭证正确
python scripts/inspect.py --config prod-servers.yaml --output report.html
示例2:定期健康检查
- 场景/输入:需要每小时检查一次服务器状态
- 预期产出:每小时生成一份新报告,保存在
reports/目录 - 关键要点:指定
--interval 3600,报告按时间戳命名
python scripts/inspect.py --config prod-servers.yaml --output reports/ --interval 3600
示例3:仅统计在线服务器
- 场景/输入:部分服务器可能离线,希望只报告在线服务器
- 预期产出:自动跳过离线服务器,仅显示可访问的服务器数据
- 关键要点:使用
--online-only参数
python scripts/inspect.py --config servers.yaml --output report.html --online-only
资源索引
- 脚本:见 scripts/inspect.py
- 用途:主巡检脚本,负责SSH连接、数据采集、报告生成
- 参数:
--config:服务器配置文件路径(必需)--output:输出报告路径(必需)--interval:巡检间隔秒数,不指定则单次执行--online-only:仅报告在线服务器--timeout:SSH连接超时时间(默认10秒)
- 参考:见 references/server-config.md
- 何时读取:配置服务器列表时
注意事项
- SSH连接基于密码认证,确保目标服务器支持密码认证或使用密钥认证
- 采集指标时会在服务器上执行
top、df、free等命令,对服务器负载影响轻微 - 网络带宽测量需要2次采样,首次执行会略慢
- 建议在非高峰期执行大规模巡检
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决运维人员批量监控服务器性能的实际痛点
- 支持多维度指标采集与可视化报告生成
- 适用于周期性健康检查与多服务器性能对比
Highlights
- 触发词精准覆盖巡检、监控、性能对比等核心场景
- description 清晰描述功能边界与适用条件
Highlights
- 操作步骤分阶段清晰,含准备、执行、查看全流程
- 提供多个端到端使用示例,涵盖基础与高级场景
- frontmatter 完整,依赖与参数说明详尽
Highlights
- 依赖库版本明确,参数设计合理
- 支持异常处理机制(--online-only 跳过离线服务器)
- SSH 连接超时与错误处理机制完善
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 24 -
Accounts, secrets or authorization
Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.
Mentioned in main document · lines 125
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Translation pending; see source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.