echo "Checking HDs ... \n"; } require_once '../common.php'; require_once '../functions_tool_main.php'; $domainList = tool_admin_domains_get_list(); $service_command = "aes.execScript df"; if (defined('NELTOOL_CRON_DEBUG')) { echo "domainList\n" . print_r($domainList, true) . "\n"; } $aesList = array(); if (is_array($domainList)) { reset($domainList); foreach ($domainList as $domain_data) { if ($domain_data['domain_hd_check'] == 1) { //echo '<pre>'. print_r($domain_data, true) .'</pre>'; $adminService = new MyAdminService(); if (@$adminService->connect($domain_data['domain_as_host'], $domain_data['domain_as_port'], $res) !== false) { $status = $adminService->getStates(); $domainServices = tool_main_parse_status($status); $aesList = tool_main_get_aes_from_status($domainServices); //echo '<pre>'. print_r($aesList, true) .'</pre>'; if (sizeof($aesList)) { reset($aesList); foreach ($aesList as $service) { $adminService->serviceCmd($service, $service_command); if (!$adminService->waitCallback()) { // error } } $aes_df_result = $tpl->get_template_vars('tool_execute_result'); $tpl->clear_assign('tool_execute_result');
reset($rrd_values); foreach ($rrd_values as $rrd_value) { $rrd_output = NELTOOL_RRDSYSBASE . $tool_selected_variable_data['low_file'] . "-" . $rrd_value . ".gif"; $rrd_web = NELTOOL_RRDWEBBASE . $tool_selected_variable_data['low_file'] . "-" . $rrd_value . ".gif"; $rrd_exec = NELTOOL_RRDTOOL . " graph " . $rrd_output . " --start -" . $rrd_value . " " . $rrd_def . " " . $rrd_draw; nt_common_add_debug($rrd_exec); exec($rrd_exec, $rrd_result, $rrd_code); $rrd_webs[] = array('desc' => $tool_selected_variable_data['low_file'] . ' over ' . $rrd_value . 's.', 'img' => $rrd_web); } $tpl->assign('tool_rrd_output', $rrd_webs); } if ($tool_selected_variable_data['high_file'] != '') { $rrd_webs = array(); $rrd_values = array(array(10000, 10), array(30000, 10), array(90000, 10)); // 10s, 30s, 90s (unit is 1 ms) $adminService = new MyAdminService(); if (@$adminService->connect($AS_Host, $AS_Port, $res) === false) { nt_common_add_debug($res); $tpl->assign('tool_domain_error', $res); } else { $now = time(); $rrd_webs = array(); reset($rrd_values); foreach ($rrd_values as $rrd_value) { nt_common_add_debug(" getHighRezGraph : " . $tool_selected_variable_data['service'] . "." . $tool_selected_variable_data['variable'] . " , " . ($now - $rrd_value[0] / 1000) . " , " . $now . " , " . $rrd_value[1]); $tmp = $adminService->getHighRezGraph($tool_selected_variable_data['service'] . '.' . $tool_selected_variable_data['variable'], $now - $rrd_value[0] / 1000, $now, $rrd_value[1]); //nt_common_add_debug(" getHighRezGraph : ". $tool_selected_variable_data['service'] .".". $tool_selected_variable_data['variable'] ." , ". ($rrd_value[0] / 1000) ." , 0 , 0"); //$tmp = $adminService->getHighRezGraph($tool_selected_variable_data['service'] .'.'. $tool_selected_variable_data['variable'], ($rrd_value[0] / 1000), 0, 0); nt_common_add_debug($tmp); $mean_values = tool_graphs_extract_mean_values($tmp); nt_common_add_debug($mean_values);
$tpl->assign('restriction_tool_guild_locator_manage_members', true); } if (tool_admin_applications_check('tool_guild_locator_manage_forums')) { $tpl->assign('restriction_tool_guild_locator_manage_forums', true); } if ($view_domain_id) { $tool_as_error = null; $AS_Name = tool_main_get_domain_name($view_domain_id); $AS_Host = tool_main_get_domain_host($view_domain_id); $AS_Port = tool_main_get_domain_port($view_domain_id); $AS_ShardName = tool_main_get_shard_name($view_shard_id); $MFS_Web = tool_main_get_domain_data($view_domain_id, 'domain_mfs_web'); $tpl->assign('tool_page_title', 'Guild Locator - ' . $AS_Name . ($AS_ShardName != '' ? ' / ' . $AS_ShardName : '')); $tool_as_error = null; if ($AS_Host && $AS_Port) { $adminService = new MyAdminService(); if (@$adminService->connect($AS_Host, $AS_Port, $res) === false) { nt_common_add_debug($res); $tpl->assign('tool_domain_error', $res); } else { $tool_services_gl = null; if (isset($NELTOOL['POST_VARS']['services_gl'])) { $tool_services_gl = $NELTOOL['POST_VARS']['services_gl']; } elseif (isset($NELTOOL['GET_VARS']['services_gl'])) { $tool_services_gl = $NELTOOL['GET_VARS']['services_gl']; } if ($tool_services_gl) { $tpl->assign('tool_post_data', base64_encode(serialize($NELTOOL['POST_VARS']))); switch ($tool_services_gl) { case 'display guilds': $service_list = tool_main_get_checked_services();
// locking the shard * will lock the domain // so you must not be able to lock this shard $tpl->assign('tool_cant_lock', true); } $tpl->assign('tool_lock_info', $tool_lock_info); $tpl->assign('tool_annotation_info', $tool_annotation_info); if (tool_admin_applications_check('tool_notes')) { $tool_note_list = tool_notes_get_list($nel_user['user_id'], 1); if (sizeof($tool_note_list)) { $tpl->assign('restriction_tool_notes', true); $tpl->assign('tool_note_list', $tool_note_list); } } $tool_as_error = null; if ($AS_Host && $AS_Port) { $adminService = new MyAdminService(); if (@$adminService->connect($AS_Host, $AS_Port, $res) === false) { nt_common_add_debug($res); $tpl->assign('tool_domain_error', $res); } else { if ($nel_user['has_lock']) { //nt_common_add_debug("HTTP_POST_VARS"); //nt_common_add_debug($HTTP_POST_VARS); //echo '<pre>'. print_r($HTTP_POST_VARS,true) .'</pre>'; //die(); // make sure you are the one who has its name in the restart info // as you can take over the lock and the restart sequence // we don't want more than 1 client executing the restart commands if they think they still have the lock if (isset($tool_restart_info) && $tool_restart_info['restart_sequence_user_name'] == $nel_user['user_name'] && tool_admin_applications_check('tool_main_easy_restart')) { $tool_seq_id = $NELTOOL['POST_VARS']['restart_sequence_id']; $tool_seq_step = $NELTOOL['POST_VARS']['restart_sequence_step'];