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:
parent
c4eb877198
commit
48d0a2e2b0
1 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@
|
||||||
# #%# capabilities=autoconf
|
# #%# 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=$?
|
returnval=$?
|
||||||
|
|
||||||
if [ "x$1" = "xautoconf" ]; then
|
if [ "x$1" = "xautoconf" ]; then
|
||||||
|
@ -55,5 +55,5 @@ __EOF__
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for target in $targets; do
|
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
|
done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue