2013-02-28 Ramon Novoa <rnovoa@artica.es>

* bin/pandora_server: Undid the previous commit since forking after
	  having launched all server threads can lead to trouble.

	* lib/PandoraFMS/Core.pm: Removed some debugging code that polluted the
	  logs.
	
	* lib/PandoraFMS/NetworkServer.pm: Removed a DISTINCT from the query since
	  module ids are unique.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7741 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Ramon Novoa 2013-02-28 10:30:32 +00:00
parent da2db93c9d
commit 0abefef794
4 changed files with 18 additions and 12 deletions

View File

@ -1,3 +1,14 @@
2013-02-28 Ramon Novoa <rnovoa@artica.es>
* bin/pandora_server: Undid the previous commit since forking after
having launched all server threads can lead to trouble.
* lib/PandoraFMS/Core.pm: Removed some debugging code that polluted the
logs.
* lib/PandoraFMS/NetworkServer.pm: Removed a DISTINCT from the query since
module ids are unique.
2013-02-27 Miguel de Dios <miguel.dedios@artica.es>
* lib/PandoraFMS/Core.pm: erased lost develop traces.

View File

@ -259,14 +259,18 @@ $SIG{'ALRM'} = 'IGNORE';
pandora_init(\%Config, 'Pandora FMS Server');
pandora_load_config (\%Config);
# Daemonize and put in background
if ($Config{'daemon'} == 1) {
print_message (\%Config, " [*] Backgrounding Pandora FMS Server process.\n", 1);
pandora_daemonize (\%Config);
}
# Load enterprise module
if (enterprise_load (\%Config) == 0) {
print_message (\%Config, " [*] Pandora FMS Enterprise module not available.", 1);
} else {
print_message (\%Config, " [*] Pandora FMS Enterprise module loaded.", 1);
}
if (enterprise_load (\%Config) != 0) {
if($Config{'policy_manager'} == 1) {
# Start thread to patrol policy queue
my $thr_policy_queue = threads->create('pandora_process_policy_queue', (\%Config));
@ -286,12 +290,6 @@ foreach my $server (@Servers) {
$server->upEvent ();
}
# Daemonize and put in background
if ($Config{'daemon'} == 1) {
print_message (\%Config, " [*] Backgrounding Pandora FMS Server process.\n", 1);
pandora_daemonize (\%Config);
}
# Main loop
my $time_ref = time ();
my $counter = 0;

View File

@ -1490,9 +1490,6 @@ Start the planned downtime, the montly type.
sub pandora_planned_downtime_monthly_stop($$) {
my ($pa_config, $dbh) = @_;
logger($pa_config, "[PLANNED_DOWNTIME] " .
"Enter pandora_planned_downtime_monthly_stop().", 10);
#my $local_time = localtime();
my @var_localtime = localtime(time);
my $year = $var_localtime[5] + 1900;

View File

@ -105,7 +105,7 @@ sub data_producer ($) {
AND (tagente_modulo.flag = 1 OR ((tagente_estado.last_execution_try + tagente_estado.current_interval) < UNIX_TIMESTAMP()))
ORDER BY tagente_modulo.flag DESC, time_left ASC, tagente_estado.last_execution_try ASC ', $pa_config->{'servername'});
} else {
@rows = get_db_rows ($dbh, 'SELECT DISTINCT(tagente_modulo.id_agente_modulo), tagente_modulo.flag, tagente_estado.last_execution_try, tagente_estado.current_interval + tagente_estado.last_execution_try AS time_left, last_execution_try
@rows = get_db_rows ($dbh, 'SELECT tagente_modulo.id_agente_modulo, tagente_modulo.flag, tagente_estado.last_execution_try, tagente_estado.current_interval + tagente_estado.last_execution_try AS time_left, last_execution_try
FROM tagente, tagente_modulo, tagente_estado
WHERE ((server_name = ?) OR (server_name = ANY(SELECT name FROM tserver WHERE status = 0)))
AND tagente_modulo.id_agente = tagente.id_agente