Linux系统性能监控脚本 1. CPU 使用率监控 监控CPU使用率,若高于阈值发送警报: #!/bin/bash LOG_FILE="/var/log/cpu_usage.log" THRESHOLD=80 current_usage=$(mpstat 1 1 | awk '/Average/ {print 100 - $ 2025-06-17 14 0 运维