From d95cb55df884344b15e826334dbaf5c53eacfe1b Mon Sep 17 00:00:00 2001 From: Darek Margas <71180450+darek-margas@users.noreply.github.com> Date: Wed, 26 Jun 2024 15:26:08 +1000 Subject: [PATCH 1/3] Update ZoL_with_sudo.conf for missing pool IO fix --- userparameters/ZoL_with_sudo.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/userparameters/ZoL_with_sudo.conf b/userparameters/ZoL_with_sudo.conf index 9cd46ec..b9ff34c 100644 --- a/userparameters/ZoL_with_sudo.conf +++ b/userparameters/ZoL_with_sudo.conf @@ -31,6 +31,11 @@ UserParameter=zfs.arcstats[*],awk '/^$1/ {printf $$3;}' /proc/spl/kstat/zfs/arcs # detect if a scrub is in progress, 0 = in progress, 1 = not in progress UserParameter=zfs.zpool.scrub[*],/usr/bin/sudo /sbin/zpool status $1 | grep "scrub in progress" > /dev/null ; echo $? +# Missing IO stats from file +# zfs.zpool.iostat[{#POOLNAME}] reads $2 writes $3 rt $0 wt $1 +UserParameter=zfs.zpool.iostat[*],/usr/bin/sudo /sbin/zpool iostat $1 -H -p 1 2 | tail -n 1 | awk '/^$1/ { printf ( "%s %s %s %s\n", $$6,$$7,$$4,$$5)}' + + # vdev state UserParameter=zfs.vdev.state[*],/usr/bin/sudo /sbin/zpool status | grep "$1" | awk '{ print $$2 }' # vdev READ error counter From ddca1de40b89789ab317f53080cf4184f9668467 Mon Sep 17 00:00:00 2001 From: Darek Margas <71180450+darek-margas@users.noreply.github.com> Date: Wed, 26 Jun 2024 15:26:53 +1000 Subject: [PATCH 2/3] Update ZoL_without_sudo.conf for missing pool IO fix --- userparameters/ZoL_without_sudo.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/userparameters/ZoL_without_sudo.conf b/userparameters/ZoL_without_sudo.conf index 5611789..4caa219 100644 --- a/userparameters/ZoL_without_sudo.conf +++ b/userparameters/ZoL_without_sudo.conf @@ -31,6 +31,10 @@ UserParameter=zfs.arcstats[*],awk '/^$1/ {printf $$3;}' /proc/spl/kstat/zfs/arcs # detect if a scrub is in progress, 0 = in progress, 1 = not in progress UserParameter=zfs.zpool.scrub[*],/sbin/zpool status $1 | grep "scrub in progress" > /dev/null ; echo $? +# Missing IO stats from file +# zfs.zpool.iostat[{#POOLNAME}] reads $2 writes $3 rt $0 wt $1 +UserParameter=zfs.zpool.iostat[*],/sbin/zpool iostat $1 -H -p 1 2 | tail -n 1 | awk '/^$1/ { printf ( "%s %s %s %s\n", $$6,$$7,$$4,$$5)}' + # vdev state UserParameter=zfs.vdev.state[*],/sbin/zpool status | grep "$1" | awk '{ print $$2 }' # vdev READ error counter From c310a62cf93c94a6640d2ad8c91c593a0392eb88 Mon Sep 17 00:00:00 2001 From: Darek Margas <71180450+darek-margas@users.noreply.github.com> Date: Wed, 26 Jun 2024 15:31:04 +1000 Subject: [PATCH 3/3] Updated template xml for missing pool IO fix Changed regex to match four number string provided by iostat, added custom multiplier to match data. --- template/zol_template.xml | 3024 ++++--------------------------------- 1 file changed, 260 insertions(+), 2764 deletions(-) diff --git a/template/zol_template.xml b/template/zol_template.xml index 4ccfb26..5e62cb7 100644 --- a/template/zol_template.xml +++ b/template/zol_template.xml @@ -1,7 +1,7 @@ - 4.0 - 2021-01-04T21:27:59Z + 5.0 + 2024-06-26T05:21:14Z Templates @@ -9,10 +9,9 @@