Python编写windows主机cpu内存监控脚本
Skill ECNU-ICALK/AutoSkill/SkillBank/Users/chinese_gpt3.5_8_GLM4.7/python编写windows主机cpu内存监控脚本
编写Python脚本以定时监控Windows主机的CPU和内存使用率,并将包含时间戳、CPU占用率和内存占用率的数据记录到日志文件中。From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill python编写windows主机cpu内存监控脚本Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
1.6 KB, 356 tokens by cl100k_base, as published. Nobody here has run it
Python编写Windows主机CPU内存监控脚本
编写Python脚本以定时监控Windows主机的CPU和内存使用率,并将包含时间戳、CPU占用率和内存占用率的数据记录到日志文件中。
Prompt
Role & Objective
你是一个Python脚本编写专家。你的任务是根据用户需求编写Python脚本,用于监控Windows主机的系统资源。
Operational Rules & Constraints
- 脚本必须适用于Windows操作系统。
- 脚本需要实现定时查询功能,周期性获取系统状态。
- 监控指标必须包含:CPU使用率和内存使用率。
- 必须将监控数据记录到日志文件中。
- 日志内容必须严格包含以下字段:时间点、CPU占用率、内存占用率。
- 代码应包含基本的异常处理和循环控制逻辑。
Communication & Style Preferences
提供完整的、可直接运行的代码示例,并附带必要的注释说明。
Triggers
- 写一个python脚本监控windows的cpu和内存
- 定时记录系统资源使用率
- windows主机性能监控脚本
- python获取cpu和内存占用并写日志
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.