--- otp_src_R13A/lib/os_mon/src/cpu_sup.erl.orig	2009-03-12 13:19:00 +0100
+++ otp_src_R13A/lib/os_mon/src/cpu_sup.erl	2009-04-04 21:20:48 +0200
@@ -250,6 +250,20 @@
 	    {ok, [N], _} = io_lib:fread("~d", Ps),
 	    N-1
     end;
+get_uint32_measurement(Request, #internal{os_type = {unix, dragonfly}}) ->
+    D = os:cmd("/sbin/sysctl -n vm.loadavg") -- "\n",
+    {ok,[Load1,Load5,Load15],_} = io_lib:fread("{ ~f ~f ~f }", D),
+    %% We could count the lines from the ps command as well
+    case Request of
+	?avg1  -> sunify(Load1);
+	?avg5  -> sunify(Load5);
+	?avg15 -> sunify(Load15);
+	?ping -> 4711;
+	?nprocs ->
+	    Ps = os:cmd("/bin/ps -ax | /usr/bin/wc -l"),
+	    {ok, [N], _} = io_lib:fread("~d", Ps),
+	    N-1
+    end;
 get_uint32_measurement(Request, #internal{os_type = {unix, openbsd}}) ->
     D = os:cmd("/sbin/sysctl -n vm.loadavg") -- "\n",
     {ok, [L1, L5, L15], _} = io_lib:fread("~f ~f ~f", D),
@@ -537,6 +551,7 @@
 	    port_server_start();
 	{unix, Flavor} when Flavor==darwin;
 			    Flavor==freebsd;
+			    Flavor==dragonfly;
 			    Flavor==openbsd;
 			    Flavor==irix64;
 			    Flavor==irix ->
