Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
主机是 RHEL5,我想通过运行某个进程或脚本触发的警报是 TotalSwapUsedPercent .. 有没有快速简便的方法?
这将为您提供 TotalSwapUsedPercent:
free -t | grep Swap | awk '{print ($3 / $2) * 100 "%"}'
您可以将其放入任何监控系统或 cron 或任何您想要的。