diff --git a/luninfo b/luninfo index 8bd2130..81f70b5 100755 --- a/luninfo +++ b/luninfo @@ -32,6 +32,7 @@ # Version 1.17 Fixed scsi id detection for mpioosdisks on 2145 # Version 1.18 Relax regex for getting fc adapter firmware version # Version 1.19 added support for Purestorage Flash array +# Version 1.20 stderr redirection for pcmpath use strict; use warnings; @@ -42,7 +43,7 @@ use List::Util qw( max ); use XML::Simple; # for config file #use Data::Dumper; -my $luninfo_version="1.19"; +my $luninfo_version="1.20"; my $cfgfile="/etc/luninfo.cfg"; @@ -737,7 +738,7 @@ sub get_all_path_prio { # get all path priorities for sddpcm disks sub get_all_sdd_path_prio { return if ( ! -x "$pcmpath" ); - my $pcmpath_data = qx { $pcmpath query device}; + my $pcmpath_data = qx { $pcmpath query device 2>/dev/null }; my $rc=$? >> 8; if ( $rc == 0 ) { # only when there is no error from pcmpath! There are rare occasions, where this is not right, # e.g. after sddpcm upgrade without reboot @@ -1152,7 +1153,7 @@ elsif ( $options{'fscsi'} ) { # get SDDPCM adapter state. Important on NPIV installations since AIX adapter state (speed, link state) does not reflect reality if ( -x "$pcmpath" ) { my $start_marker_not_found=1; - open(CMD,"$pcmpath query adapter|") or die "Error running $pcmpath query adapter!\n"; + open(CMD,"$pcmpath query adapter 2>/dev/null |") or die "Error running $pcmpath query adapter!\n"; # 0 fscsi0 NORMAL ACTIVE 68 0 2 2 # IMPORTANT: The adapter name is fscsi, NOT fcs!! while() {