diff --git a/gearmand_status.php b/gearmand_status.php index e627e07..0cdd7f5 100644 --- a/gearmand_status.php +++ b/gearmand_status.php @@ -86,8 +86,13 @@ foreach($proc as $id=>$w) { foreach($w["abilities"] as $a){ - - $workers[$w["ip"]]["abilities"][$a]++; + + if (isset($workers[$w["ip"]]["abilities"][$a])) { + $workers[$w["ip"]]["abilities"][$a]++; + } else { + $workers[$w["ip"]]["abilities"][$a] = 1; + } + $total_job_status[$a]["capable_workers"]++; }