View Single Post
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#5
Here is the Normal version of the "Rootfs(%):" command:
Code:
df | awk '$1 == "rootfs" {print $5}'
Here is the equivalent Beeconified version of the "Rootfs(%):" command which you can replace:
Code:
df | awk 'BEGIN { FS="[ %]+" } $1 == "rootfs" { print $5 "%"; if ($5 < 90) exit 0; else if ($5 < 95) exit 1; else exit 2 }'
With the beeconified version of the command, the awk statement will return:
Exit Status 0 (Green Beecon) for less the 90% rootfs file system full
Exit Status 1 (Yellow Beecon) for less the 95% rootfs file system full
Exit Status 2 (Red Beecon) for 95% or more rootfs file system full

Last edited by No!No!No!Yes!; 2010-02-22 at 16:48.
 

The Following User Says Thank You to No!No!No!Yes! For This Useful Post: