command for getting amount of processes $checkArray = array( "MySQL" => 'ps -aux | grep "mysqld" | wc -l', "SCPRP" => 'ps -aux | grep "srcds_linux.*scprp" | wc -l', "PRP" => 'ps -aux | grep "srcds_linux.*policerp" | wc -l', "SWRP" => 'ps -aux | grep "srcds_linux.*starwarsrp" | wc -l', "GTA" => 'ps -aux | grep " gta " | wc -l', "Minecraft" => 'ps -aux | grep "java.*BungeeCord" | wc -l', ); foreach($checkArray as $key => $value){ $output = shell_exec($value); $pss = intval($output)-2; $status = "Not running"; if($pss > 0){ $status = "Running"; } $htmlTable .= "
" . $key . "" . $status . "
"; } $htmlTable .= "