<?php

exec("ps -ef | grep TowerOptoSifAndSpectral | grep -v grep",$output,$return);
//var_dump( $output);
if ( count($output)>0)
{
    echo '<div style="width: 40px;height: 20px;background: green"></div>';
}else{
    echo '<div style="width: 40px;height: 20px;background: red"></div>';
}