diff --git a/pandora_agents/unix/ChangeLog b/pandora_agents/unix/ChangeLog index b43451494b..aab9893bc2 100644 --- a/pandora_agents/unix/ChangeLog +++ b/pandora_agents/unix/ChangeLog @@ -1,3 +1,9 @@ +2011-09-13 Koichiro Kikuchi + + * pandora_agent: Clear the old process information before + parsing current process information. Also added + missing load_procs() call to module_cpuproc(). + 2011-09-05 Koichiro Kikuchi * pandora_agent_daemon: Added support for OpenVZ/Virtuozzo. diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 3b328c07d3..b1d87d3395 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1016,6 +1016,9 @@ sub load_procs () { my @procs = `$cmd`; return undef unless ($? eq 0); + # Clear past process infomation + %Procs = (); + # Parse process information foreach my $proc (@procs) { @@ -1162,6 +1165,9 @@ sub module_cpuproc ($) { # Check module parameters return () unless ($module->{'params'} ne ''); + # Data collection layer + load_procs (); + return () unless defined ($Procs{$module->{'params'}}) and defined ($Procs{$module->{'params'}}{'cpu'}); return ($Procs{$module->{'params'}}{'cpu'}); }