<?php

function collect_cpuUsage($debug, $log) {
    $usage = explode(" ", exec('vmstat 1 2'));
	
	print_r($usage);
	
	// Get CPU usage
	$cpu = 100 - $usage[43];
	
	// Get WA CPU usage
	$wa = $usage[44];

    if ($debug == TRUE) {
        debug("[DEBUG_COLLECT] CPU Usage: ".$cpu." WA CPU Usage: ".$wa."\n", $log);
    }
	
    $return = $cpu.",".$wa;

    return $return;

}
?>
<?php

function collect_cpuUsage($debug, $log) {
    $usage = explode(" ", exec('vmstat 1 2'));
	
	print_r($usage);

    if ($debug == TRUE) {
        debug("[DEBUG_COLLECT] ", $log);
    }

    $return = "";

    return $return;

}
?>
--- 
+++ 
@@ -4,12 +4,18 @@
     $usage = explode(" ", exec('vmstat 1 2'));
 	
 	print_r($usage);
+	
+	// Get CPU usage
+	$cpu = 100 - $usage[43];
+	
+	// Get WA CPU usage
+	$wa = $usage[44];
 
     if ($debug == TRUE) {
-        debug("[DEBUG_COLLECT] ", $log);
+        debug("[DEBUG_COLLECT] CPU Usage: ".$cpu." WA CPU Usage: ".$wa."\n", $log);
     }
-
-    $return = "";
+	
+    $return = $cpu.",".$wa;
 
     return $return;
 
Add correct debugging text.  Fetch and reeturn CPU and WA CPU
