1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00

fix - remove error message, fetch correct count source

* redirect error message of `ls` to /dev/null
* fetch mismatch_cnt to get correct count

* https://www.kernel.org/doc/Documentation/md.txt
  * sync_completed: the number of sectors that have been completed
  * mismatch_cnt: the number of errors that are found
This commit is contained in:
Ken-ichi Mito 2015-05-05 01:02:49 +09:00
parent c4eb877198
commit 48d0a2e2b0

View file

@ -24,7 +24,7 @@
# #%# capabilities=autoconf
targets=`ls /sys/devices/virtual/block/*/md/mismatch_cnt | cut -d/ -f6`
targets=`ls /sys/devices/virtual/block/*/md/mismatch_cnt 2> /dev/null | cut -d/ -f6`
returnval=$?
if [ "x$1" = "xautoconf" ]; then
@ -55,5 +55,5 @@ __EOF__
fi
for target in $targets; do
echo $target.value $(cat /sys/devices/virtual/block/$target/md/sync_completed)
echo $target.value $(cat /sys/devices/virtual/block/$target/md/mismatch_cnt)
done