mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Update plugins/zfs/zfs_stats_
Don't divide by zero if there is no l2arc Error output from zfs_stats_cachehitlist: dc: divide by zero
This commit is contained in:
parent
86be28e7db
commit
c26049e8d2
1 changed files with 4 additions and 2 deletions
|
@ -109,8 +109,10 @@ else
|
|||
fi
|
||||
|
||||
L2_ACCESSES_TOTAL=`echo "$L2_HITS+$L2_MISSES" | $BC`
|
||||
L2_HIT_RATIO_PERC=`echo "scale=2 ; (100*$L2_HITS/$L2_ACCESSES_TOTAL)" | $BC`
|
||||
L2_MISS_RATIO_PERC=`echo "scale=2 ; (100*$L2_MISSES/$L2_ACCESSES_TOTAL)" | $BC`
|
||||
if [ $L2_ACCESSES_TOTAL -gt 0 ]; then
|
||||
L2_HIT_RATIO_PERC=`echo "scale=2 ; (100*$L2_HITS/$L2_ACCESSES_TOTAL)" | $BC`
|
||||
L2_MISS_RATIO_PERC=`echo "scale=2 ; (100*$L2_MISSES/$L2_ACCESSES_TOTAL)" | $BC`
|
||||
fi
|
||||
|
||||
efficiency() {
|
||||
if [ "$1" = "config" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue