$OpenBSD: patch-plugins_node_d_openbsd_swap_in,v 1.2 2012/10/12 09:46:46 kirby Exp $
--- plugins/node.d.openbsd/swap.in.orig	Fri Aug 31 19:22:50 2012
+++ plugins/node.d.openbsd/swap.in	Sun Sep 30 23:19:21 2012
@@ -16,8 +16,8 @@
 
 
 if [ "$1" = "autoconf" ]; then
-    if [ -x /sbin/sysctl ]; then
-        /sbin/sysctl vm.stats.vm.v_swappgsin > /dev/null
+    if [ -x /usr/bin/vmstat ]; then
+        /usr/bin/vmstat > /dev/null
     	if [ $? = "0" ]; then
 	    	echo yes
     		exit 0
@@ -51,8 +51,6 @@ if [ "$1" = "config" ]; then
 	exit 0
 fi
 
+/usr/bin/vmstat | /usr/bin/awk 'END { print "swap_in.value " $8 "\nswap_out.value " $9 }'
+
 #awk '/swap/ { print "swap_in.value " $2 "\nswap_out.value " $3 }' < /proc/stat 
-echo -n 'swap_in.value '
-/sbin/sysctl -n vm.stats.vm.v_swappgsin
-echo -n 'swap_out.value '
-/sbin/sysctl -n vm.stats.vm.v_swappgsout
