Reputation: 86
The host is RHEL5 and the alarm I want to trigger by running some process or a script is TotalSwapUsedPercent .. is there a quick and easy way?
Upvotes: 1
Views: 274
Reputation: 6738
This will give you the TotalSwapUsedPercent:
free -t | grep Swap | awk '{print ($3 / $2) * 100 "%"}'
You could put that into any monitoring system or cron or whatever you want.
Upvotes: 1