Build precise queries to find exactly what you need
Press ESC to close
@lkieffer
Favorites0
Views
Projects0
Hello, I have add the following code to process hotspare policy of VNX2: # add for VNX2 my $policy_line = 0; open (NAVICLIOUT ,"$NAVICLI_CMD -h $opt_host hotsparepolicy -list |"); while () { # First lets check for errors before proceeding check_for_errors($_); # check for policy lines if( $_ =~ m/^Policy ID:/) { $policy_line=1; } if ($policy_line == 1) { # check for hot spare lines if( $_ =~ m/^Unused disks for hot spares:s+(.*)$/) { $hotspare_count=$hotspare_count+$1 } } # end of section if ( $_ =~ m/^s*$/) { $policy_line=0; } } close (NAVICLIOUT);
Reviewed 12 years ago