From 290096baac2d54f0f5ae2910bf68f18f0d0b11b5 Mon Sep 17 00:00:00 2001 From: darode Date: Fri, 30 Jul 2010 12:25:23 +0000 Subject: [PATCH] 2010-07-30 Dario Rodriguez * unix/pandora_agent: Added code to change the nice parameter of the pandora_agent process. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3082 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_agents/ChangeLog | 11 +++++++++++ pandora_agents/unix/pandora_agent | 10 +++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/pandora_agents/ChangeLog b/pandora_agents/ChangeLog index f2d6d91cfc..b126e3d3de 100644 --- a/pandora_agents/ChangeLog +++ b/pandora_agents/ChangeLog @@ -1,7 +1,18 @@ +2010-07-30 Dario Rodriguez + + * unix/pandora_agent: Added code to change the nice parameter of the + pandora_agent process. + + 2010-07-28 Junichi Satoh * unix/SunOS/pandora_agent.conf: Fixed a typo. +2010-07-21 Dario Rodriguez + + * unix/pandora_agent: Added code to change the nice parameter of the + pandora_agent process. + 2010-07-21 Dario Rodriguez * win32/pandora_agent_conf.cc, pandora_agent_conf.h: Added logic to search diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 519d4e1e2c..0a4f4760cf 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -102,7 +102,7 @@ my %Conf = ( 'server_ssl' => 'no', 'server_opts' => '', 'delayed_startup' => 0, - 'pandora_nice' => 0, # FIXME: ¿DEPRECATED? + 'pandora_nice' => 10, 'cron_mode' => 0, 'remote_config' => 0, 'secondary_mode' => 'never', @@ -500,6 +500,10 @@ sub check_remote_config () { # Log file may have changed stop_log (); start_log (); + + #Set nice of the pandora_agent + my $PID = $$; + `renice "$Conf{'pandora_nice'}" "$PID"`; } ################################################################################ @@ -1125,6 +1129,10 @@ $Conf{'secondary_server_path'} = fix_directory ($Conf{'secondary_server_path'}); log_message ('log', 'Sleeping for ' . $Conf{'delayed_startup'} . ' seconds.') if ($Conf{'delayed_startup'} > 0); sleep ($Conf{'delayed_startup'}); +#Set nice of the pandora_agent +my $PID = $$; +`renice "$Conf{'pandora_nice'}" "$PID"`; + # Loop while (1) {