1) if_ doesn't even run: ./if_enc0[65]: syntax error: `(' unexpected 2) print correct columns in if_ and if_errcol for interfaces with and without and address column 3) our 3rd column of vmstat is not "processes waiting for page-in", just drop it. (Maybe that information is somewhere else?)
diff --git net/munin/patches/patch-plugins_node_d_openbsd_if__in net/munin/patches/patch-plugins_node_d_openbsd_if__in index e8ffc8cd6a2..39237c1fef0 100644 --- net/munin/patches/patch-plugins_node_d_openbsd_if__in +++ net/munin/patches/patch-plugins_node_d_openbsd_if__in @@ -28,11 +28,11 @@ Index: plugins/node.d.openbsd/if_.in echo 'graph_vlabel bits per ${graph_period} in (-) / out (+)' echo 'graph_category network' - echo "graph_info This graph shows the traffic of the $INTERFACE network interface. Please note that the traffic is shown in bits per second, not bytes. IMPORTANT: On older BSD systems the data source for this plugin uses 32bit counters, this plugin is really unreliable and unsuitable for most 100Mb (or faster) interfaces, where bursts are expected to exceed 50Mbps. This means that this plugin is unsuitable for old production environments." -+ echo "graph_info This graph shows the traffic of the $INTERFACE network interface. Please note that the traffic is shown in bits per second, not bytes. ++ echo "graph_info This graph shows the traffic of the $INTERFACE network interface. Please note that the traffic is shown in bits per second, not bytes." echo 'rbytes.label received' echo 'rbytes.type DERIVE' echo 'rbytes.graph no' -@@ -69,9 +69,9 @@ fi +@@ -69,9 +69,11 @@ fi if [ "$INTERFACE" = "aggregated" ]; then /usr/bin/netstat -i -b -n | grep -v '^lo' | awk ' BEGIN { rsum = 0; osum = 0; } @@ -42,10 +42,12 @@ Index: plugins/node.d.openbsd/if_.in +/<Link>/ { + if (NF == 5) { + rsum += $4; osum += $5; ++ } else if (NF == 6) { ++ rsum += $5; osum += $6; } else if (NF == 11) { if ($4 ~ /:/) { rsum += $7; osum += $10; -@@ -79,7 +79,7 @@ BEGIN { rsum = 0; osum = 0; } +@@ -79,7 +81,7 @@ BEGIN { rsum = 0; osum = 0; } rsum += $7; osum += $10; } } else { # NF == 12 @@ -54,7 +56,7 @@ Index: plugins/node.d.openbsd/if_.in } } END { -@@ -89,17 +89,17 @@ END { +@@ -89,17 +91,20 @@ END { else /usr/bin/netstat -i -b -n -I $INTERFACE | awk ' @@ -66,6 +68,9 @@ Index: plugins/node.d.openbsd/if_.in + if (NF == 5) { + print "rbytes.value", $4; + print "obytes.value", $5; ++ } else if (NF == 6) { ++ print "rbytes.value", $5; ++ print "obytes.value", $6; } else if (NF == 11) { if ($4 ~ /:/) { print "rbytes.value", $7; diff --git net/munin/patches/patch-plugins_node_d_openbsd_if_errcoll__in net/munin/patches/patch-plugins_node_d_openbsd_if_errcoll__in index 506d7198f77..86e22774534 100644 --- net/munin/patches/patch-plugins_node_d_openbsd_if_errcoll__in +++ net/munin/patches/patch-plugins_node_d_openbsd_if_errcoll__in @@ -23,7 +23,7 @@ Index: plugins/node.d.openbsd/if_errcoll_.in exit 0 else exit 1 -@@ -57,21 +57,21 @@ if [ "$1" = "config" ]; then +@@ -57,25 +57,15 @@ if [ "$1" = "config" ]; then exit 0 fi; @@ -36,22 +36,24 @@ Index: plugins/node.d.openbsd/if_errcoll_.in print "ierrors.value", $5; - print "oerrors.value", $8; - print "collisions.value", $10; -+ print "oerrors.value", $7; -+ print "collisions.value", $8; - } else if (NF == 11) { - if ($4 ~ /:/) { +- } else if (NF == 11) { +- if ($4 ~ /:/) { - print "ierrors.value", $6; - print "oerrors.value", $9; -+ print "ierrors.value", $8; -+ print "oerrors.value", $10; - print "collisions.value", $11; - } else { +- print "collisions.value", $11; +- } else { - print "ierrors.value", $5; - print "oerrors.value", $9; - print "collisions.value", $11; -+ print "ierrors.value", $6; -+ print "oerrors.value", $8; -+ print "collisions.value", $9; - } - } else { # NF == 12 +- } +- } else { # NF == 12 ++ print "oerrors.value", $7; ++ print "collisions.value", $8; ++ } else { print "ierrors.value", $6; +- print "oerrors.value", $10; +- print "collisions.value", $12; ++ print "oerrors.value", $8; ++ print "collisions.value", $9; + } + }' -- I'm not entirely sure you are real.