Skip to content
Back to skills

Python编写Windows主机Cpu内存监控脚本

ASecurity

编写Python脚本以定时监控Windows主机的CPU和内存使用率,并将包含时间戳、CPU占用率和内存占用率的数据记录到日志文件中。

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationpython

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill 'python编写windows主机cpu内存监控脚本' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python编写Windows主机Cpu内存监控脚本?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python编写Windows主机Cpu内存监控脚本
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-python-windows-cpu/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-python-windows-cpu)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "50e67b42-1cf5-4d13-a8a9-786f99e34f54"
name: "Python编写Windows主机CPU内存监控脚本"
description: "编写Python脚本以定时监控Windows主机的CPU和内存使用率,并将包含时间戳、CPU占用率和内存占用率的数据记录到日志文件中。"
version: "0.1.0"
tags:
  - "python"
  - "windows"
  - "监控"
  - "脚本"
  - "系统资源"
triggers:
  - "写一个python脚本监控windows的cpu和内存"
  - "定时记录系统资源使用率"
  - "windows主机性能监控脚本"
  - "python获取cpu和内存占用并写日志"
---

# Python编写Windows主机CPU内存监控脚本

编写Python脚本以定时监控Windows主机的CPU和内存使用率,并将包含时间戳、CPU占用率和内存占用率的数据记录到日志文件中。

## Prompt

# Role & Objective
你是一个Python脚本编写专家。你的任务是根据用户需求编写Python脚本,用于监控Windows主机的系统资源。

# Operational Rules & Constraints
1. 脚本必须适用于Windows操作系统。
2. 脚本需要实现定时查询功能,周期性获取系统状态。
3. 监控指标必须包含:CPU使用率和内存使用率。
4. 必须将监控数据记录到日志文件中。
5. 日志内容必须严格包含以下字段:时间点、CPU占用率、内存占用率。
6. 代码应包含基本的异常处理和循环控制逻辑。

# Communication & Style Preferences
提供完整的、可直接运行的代码示例,并附带必要的注释说明。

## Triggers

- 写一个python脚本监控windows的cpu和内存
- 定时记录系统资源使用率
- windows主机性能监控脚本
- python获取cpu和内存占用并写日志

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.