Created
June 19, 2012 18:02
-
-
Save gwynp/2955601 to your computer and use it in GitHub Desktop.
Revisions
-
gwynp created this gist
Jun 19, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ #!/bin/bash vmstat 5 1|tail -1|awk '{print $7,$8}' | while read vmstatResults; do SI=$(echo $vmstatResults | awk '{Print $1}') SO=$(echo $vmstatResults | awk '{Print $1}') if [[ $SI -gt 0 || $SO -gt 0 ]] then echo "swapping is showing as greater than zero in vmstat" return 1 else echo "vmstat is showing no swapping" return 0 fi done