summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-system/checkXFSfrag.sh
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/LinHES-system/checkXFSfrag.sh')
-rwxr-xr-xabs/core/LinHES-system/checkXFSfrag.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/abs/core/LinHES-system/checkXFSfrag.sh b/abs/core/LinHES-system/checkXFSfrag.sh
index 74b73c4..709cdac 100755
--- a/abs/core/LinHES-system/checkXFSfrag.sh
+++ b/abs/core/LinHES-system/checkXFSfrag.sh
@@ -27,10 +27,11 @@
# Original Release: 2011 December 15 (Merry Christmas!)
# DO NOT ALTER HEADER FROM THIS LINE UP.
#
-e='/bin/echo -e' # Use the echo command, not built-in.
+e='/usr/bin/echo -e' # Use the echo command, not built-in.
xfsfsr=/usr/bin/xfs_fsr # Set variable with the path to xfs_fsr.
xfsdb=/usr/bin/xfs_db # Set variable with the path to xfs_db.
-pctmax=15 # Set maxiumum frag percent needed for defrag.
+ionice=/usr/bin/ionice # Set variable with the path to ionice.
+pctmax=12 # Set maxiumum frag percent needed for defrag.
# This is zero here for testing purposes only
# a higher number should be used in production.
array=`df -T|grep xfs|cut -f 1 --delim=" "` # Array of all XFS file systems.
@@ -48,7 +49,7 @@ do
$e "${i} is $percentage% fragmented. Running defragment on ${i}."
# Only uncomment one of the following two lines.
#$xfsfsr -v ${i} # Uncomment for verbose defrag.
- $xfsfsr ${i} # Uncomment for quiet defrag.
+ $ionice -c3 $xfsfsr ${i} # Uncomment for quiet defrag.
else
$e "${i} is $percent2% fragmented and is below the fragmentation threshold of $pctmax%. Skipping."
fi