summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-system/checkXFSfrag.sh
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2015-10-12 14:41:42 (GMT)
committerBritney Fransen <brfransen@gmail.com>2015-10-12 14:41:42 (GMT)
commit8cde77bead8cdc72f8a8b4f7f70eb5e5eed3a8b3 (patch)
tree7c8851db10ccd066a0b7bd84edefe2f0aba8f060 /abs/core/LinHES-system/checkXFSfrag.sh
parentea40cf061878a535bbc9dc287bf1ceeccb2c21dc (diff)
downloadlinhes_pkgbuild-8cde77bead8cdc72f8a8b4f7f70eb5e5eed3a8b3.zip
linhes_pkgbuild-8cde77bead8cdc72f8a8b4f7f70eb5e5eed3a8b3.tar.gz
linhes_pkgbuild-8cde77bead8cdc72f8a8b4f7f70eb5e5eed3a8b3.tar.bz2
LinHES-system: checkXFSfrag.sh: ionice xfs_fsr
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