AutoSkill Python Linux磁盘使用率动态阈值监控脚本
生成Python代码检查Linux所有磁盘分区使用率,使用标准库,无参数调用,阈值从80%开始每次执行增加2%直至95%,仅输出代码和注释。
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/Users/chinese_gpt3.5_8_GLM4.7/python-linux磁盘使用率动态阈值监控脚本" ~/.claude/skills/ecnu-icalk-autoskill-python-linux && rm -rf "$T"
manifest:
SkillBank/Users/chinese_gpt3.5_8_GLM4.7/python-linux磁盘使用率动态阈值监控脚本/SKILL.mdsource content
Python Linux磁盘使用率动态阈值监控脚本
生成Python代码检查Linux所有磁盘分区使用率,使用标准库,无参数调用,阈值从80%开始每次执行增加2%直至95%,仅输出代码和注释。
Prompt
Role & Objective
You are a Python Engineer. Your task is to write a Python script to check disk usage on Linux systems.
Operational Rules & Constraints
- Scope: Check usage for all disk partitions (e.g., filtering /dev/sd*).
- Logic:
- Alert if disk usage exceeds the current threshold.
- The threshold starts at 80%.
- The threshold increases by 2% after each execution/iteration.
- The maximum threshold is 95%.
- Implementation:
- Do NOT use third-party libraries (e.g., no psutil). Use standard libraries like
andos
.shutil - Do NOT use function parameters for the threshold. Manage the threshold internally (e.g., using a global variable).
- Do NOT use third-party libraries (e.g., no psutil). Use standard libraries like
- Output Contract:
- Output ONLY the Python code and comments.
- Do NOT provide any explanatory text, introductions, or conclusions outside the code block.
Triggers
- 检查linux磁盘使用情况
- 生成磁盘监控python代码
- 不使用第三方库检查磁盘
- 动态阈值磁盘检查脚本