diff --git a/xCAT-server/lib/xcat/monitoring/xcatmon.pm b/xCAT-server/lib/xcat/monitoring/xcatmon.pm index c3c7b85a5..b44574039 100644 --- a/xCAT-server/lib/xcat/monitoring/xcatmon.pm +++ b/xCAT-server/lib/xcat/monitoring/xcatmon.pm @@ -242,14 +242,15 @@ sub getMonNodesStatus { if ($iphash{$sv}) { $monnodes=$hierachy->{$_}; } - } + - foreach(@$monnodes) { - my $node=$_->[0]; - my $status=$_->[2]; - if ($status eq $::STATUS_ACTIVE) { push(@active_nodes, $node);} - elsif ($status eq $::STATUS_INACTIVE) { push(@inactive_nodes, $node);} - else { push(@unknown_nodes, $node);} + foreach(@$monnodes) { + my $node=$_->[0]; + my $status=$_->[2]; + if ($status eq $::STATUS_ACTIVE) { push(@active_nodes, $node);} + elsif ($status eq $::STATUS_INACTIVE) { push(@inactive_nodes, $node);} + else { push(@unknown_nodes, $node);} + } } $status{$::STATUS_ACTIVE}=\@active_nodes;