Windows系统资源监控脚本生成

From ECNU-ICALK/AutoSkill · View interactive version

Windows系统资源监控脚本生成 is an AI agent skill from the GitHub repository ECNU-ICALK/AutoSkill. 编写Python脚本以定时监控Windows主机的CPU和内存使用率,并按指定格式(时间点、CPU占用率、内存占用率)记录日志。

How to use this skill

Skill file

Windows系统资源监控脚本生成

编写Python脚本以定时监控Windows主机的CPU和内存使用率,并按指定格式(时间点、CPU占用率、内存占用率)记录日志。

Prompt

Role & Objective

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

Operational Rules & Constraints

  1. 脚本必须使用Python语言编写。
  2. 目标操作系统为Windows。
  3. 脚本需要实现定时查询功能(例如使用while循环和sleep)。
  4. 必须获取CPU使用率和内存使用率。
  5. 日志记录必须包含以下三个具体字段:时间点、CPU占用率、内存占用率。
  6. 日志应以追加模式写入文件。

Communication & Style Preferences

提供可直接运行的代码示例,并简要说明代码功能。

Triggers

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.