code related with monitor interface is put here. */ #displayMonitorLists() will generate all the monitoring plug-ins, #the user can select the plug-ins he wants to operate on, #and press the "Next" button; function displayMonitorLists() { #The command "monls -a" is used to get the monitoring plug-ins list $xml = docmd("monls"," ", array('-a')); if(getXmlErrors($xml,$errors)) { echo "
",implode(' ', $errors), "
"; exit; } #then, parse the xml data $ooe = 0; $line = 0; foreach($xml->children() as $response) foreach($response->children() as $data) { list($name, $stat, $nodemonstatus) = preg_split("/\s+/", $data); $ooe = $ooe%2; echo "Tips:(Click me to display tips)
'; echo '$tip
"; echo "\n"; } echo "This interface is still under development -use accordingly.
Condition | Response | Node | State | Action |
$cond | "; echo "$resp | "; echo "$node | "; echo "$state | "; echo ""; if($state == "Active") { insertButtons(array('label'=>'DeActivate', 'id'=>'deactivate', 'onclick'=>"control_RMCAssoc(\"$cond\", \"$node\", \"$resp\", \"stop\")")); }else if($state == "Not active"){ insertButtons(array('label'=>'Activate', 'id'=>'activate', 'onclick'=>"control_RMCAssoc(\"$cond\", \"$node\", \"$resp\", \"start\")")); } echo " | "; echo "
Conditions | |
"; echo " | $elem | "; echo "
Response | |
"; echo " | $elem | "; echo "
Can't find header line in $tab
"); } echo "Time | "; echo "$attr | "; echo "
$time | "; echo "$val | "; echo "
The Graph View for RMC Resource
Available Configurations for $name
"; echo 'Node/Application Status Monitoring Setting | "; echo ""; insertButtons(array('label'=>'Configure', 'id'=>'rmc_nodestatmon', 'onclick'=>'loadMainPage("monitor/stat_mon.php?name=rmcmon")')); echo " | "; echo "
RMC Events Monitoring Setting | "; echo ""; insertButtons(array('label'=>'Configure', 'id'=>'rmc_event', 'onclick'=>'loadMainPage("monitor/rmc_event_define.php")')); echo " | "; echo "
RMC Resource Monitoring Setting | "; echo ""; insertButtons(array('label'=>'Configure', 'id'=>'rmc_resource', 'onclick'=>'loadMainPage("monitor/rmc_resource_define.php")')); echo " | "; echo "
Node/Application Status Monitoring Setting | "; echo ""; insertButtons(array('label'=>'Configure', 'id'=>$name."_nodestatmon", 'onclick'=>"loadMainPage(\"monitor/stat_mon.php?name=$name\")")); echo " | "; echo "
View Options for $name
"; //there should be many choices for the user to view the clusters' status echo <<There's no view functions for $name.
"; } echo "",implode(' ',$errors), "
"; exit; } #then, parse the xml data foreach($xml->children() as $response) foreach($response->children() as $data) { list($n, $stat, $nodemonstatus) = preg_split("/\s+/",$data); if(isset($nodemonstatus)) { $ns = "Enabled"; }else { $ns = "Disabled"; } } display_stat_mon_table(array("$name"=> array( 'nodestat'=>$ns, 'appstat'=>'Disabled', //currently application status monitoring is not supported by xCAT monitor Arch. ))); } ?>