Attached patch backports an upstream feature to add swap usage to the memory plugin of munin. The original upstream patch can be found at: https://github.com/munin-monitoring/munin/commit/0ceb8560ad5967862a4dfa0f6695f2763ef00599
Hopefully this can be added after the ports tree is unlocked again. Thanks, Frank
Index: Makefile =================================================================== RCS file: /cvs/ports/net/munin/Makefile,v retrieving revision 1.62 diff -u -p -r1.62 Makefile --- Makefile 27 May 2017 19:57:06 -0000 1.62 +++ Makefile 6 Oct 2017 13:59:14 -0000 @@ -11,7 +11,7 @@ PKGNAME-main = munin-node-$V PKGNAME-server =munin-server-$V CATEGORIES = net -REVISION-main = 3 +REVISION-main = 4 REVISION-server = 3 HOMEPAGE = http://munin-monitoring.org/ Index: patches/patch-plugins_node_d_openbsd_memory_in =================================================================== RCS file: patches/patch-plugins_node_d_openbsd_memory_in diff -N patches/patch-plugins_node_d_openbsd_memory_in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-plugins_node_d_openbsd_memory_in 6 Oct 2017 13:59:14 -0000 @@ -0,0 +1,23 @@ +$OpenBSD$ + +Index: plugins/node.d.openbsd/memory.in +--- plugins/node.d.openbsd/memory.in.orig ++++ plugins/node.d.openbsd/memory.in +@@ -76,6 +76,10 @@ if [ "$1" = "config" ]; then + echo 'free.info pages without data content' + echo 'free.draw STACK' + ++ echo 'swap.label swap' ++ echo 'swap.info total used swap' ++ echo 'swap.draw STACK' ++ + exit 0 + fi + +@@ -85,5 +89,6 @@ vmstat -s | awk -v bpp=$PAGESIZE ' + /pages active$/ { active = $1; print "active.value " $1 * bpp; } + /pages inactive$/ { inactive = $1; print "inactive.value " $1 * bpp; } + /pages wired$/ { wired = $1; print "wired.value " $1 * bpp; } ++/swap pages in use$/ { swap = $1; print "swap.value " $1 * bpp; } + END { kernel = managed - wired - inactive - active - free; + print "kernel.value " kernel * bpp; }'