Skip to content

Commit

Permalink
infiniband-diags: mark duplicate/lower performing scripts as deprecated.
Browse files Browse the repository at this point in the history
Inform user of alternatives if available.

Changes since V1:
	Add set_nodedesc.sh

Signed-off-by: Ira Weiny <weiny2@llnl.gov>
  • Loading branch information
Ira Weiny committed Apr 30, 2012
1 parent d5df245 commit c670c59
Show file tree
Hide file tree
Showing 21 changed files with 96 additions and 18 deletions.
2 changes: 1 addition & 1 deletion man/infiniband-diags.8.in
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ perform the lookup.
.TP
\fBLocal HCA info\fR

See: ibstat, ibstatus,
See: ibstat, ibstatus

.TP
\fBConnectivity check\fR
Expand Down
7 changes: 4 additions & 3 deletions scripts/ibcheckerrors.in
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ BEGIN {
}
function check_node(lid, port)
{
if (system("'$IBPATH'/ibchecknode '"$ca_info"' '$gflags' '$verbose' " lid)) {
if (system("'$IBPATH'/ibchecknode -S '"$ca_info"' '$gflags' '$verbose' " lid)) {
ne++
print "\n# " ntype ": nodeguid 0x" nodeguid " failed"
return 1;
}
if (system("'$IBPATH'/ibcheckerrs '"$ca_info"' '$gflags' '$verbose' '$brief' " lid " " port))
if (system("'$IBPATH'/ibcheckerrs -S '"$ca_info"' '$gflags' '$verbose' '$brief' " lid " " port))
return 2;
return 0;
}
Expand Down Expand Up @@ -115,7 +115,7 @@ function check_node(lid, port)
if (check_node(lid, port) == 2)
pcnterr++;
} else if (err &&
system("'$IBPATH'/ibcheckerrs '"$ca_info"' '$gflags' '$verbose' '$brief' " lid " " port))
system("'$IBPATH'/ibcheckerrs -S '"$ca_info"' '$gflags' '$verbose' '$brief' " lid " " port))
pcnterr++;
}
Expand All @@ -125,6 +125,7 @@ function check_node(lid, port)
/iberror:/ {print $0}
END {
printf "\n*** WARNING ***: this command is deprecated; Please use \"ibqueryerrors\""
printf "\n## Summary: %d nodes checked, %d bad nodes found\n", nnodes, ne
printf "## %d ports checked, %d ports have errors beyond threshold\n", nports, pcnterr
exit (ne + pcnterr)
Expand Down
8 changes: 8 additions & 0 deletions scripts/ibcheckerrs.in
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ bw=""
verbose=""
brief=""
ca_info=""
suppress_deprecated="no"

while [ "$1" ]; do
case $1 in
Expand Down Expand Up @@ -96,6 +97,9 @@ while [ "$1" ]; do
show_thresholds
exit 0
;;
-S)
suppress_deprecated="yes"
;;
-P | -C | -t | -timeout)
case $2 in
-*)
Expand Down Expand Up @@ -135,6 +139,10 @@ else
portname=$2
fi

if [ "$suppress_deprecated" = "no" ]; then
echo "*** WARNING ***: this command is deprecated; Please use \"ibqueryerrors\"\n\n" 1>&2
fi

if [ "$guid_addr" ]; then
if ! lid=`$IBPATH/ibaddr $ca_info -G -L $1 | awk '/failed/{exit -1} {print $3}'`; then
echo -n "guid $1 address resolution: "
Expand Down
9 changes: 5 additions & 4 deletions scripts/ibchecknet.in
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ BEGIN {
}
function check_node(lid, port)
{
if (system("'$IBPATH'/ibchecknode '"$ca_info"' '$gflags' '$verbose' " lid)) {
if (system("'$IBPATH'/ibchecknode -S '"$ca_info"' '$gflags' '$verbose' " lid)) {
ne++
print "\n# " ntype ": nodeguid 0x" nodeguid " failed"
return 1;
}
if (system("'$IBPATH'/ibcheckerrs '"$ca_info"' '$gflags' '$verbose' '$brief' " lid " " port))
if (system("'$IBPATH'/ibcheckerrs -S '"$ca_info"' '$gflags' '$verbose' '$brief' " lid " " port))
return 2;
return 0;
}
Expand Down Expand Up @@ -109,9 +109,9 @@ function check_node(lid, port)
if (check_node(lid, port) == 2)
pcnterr++;
} else if (err &&
system("'$IBPATH'/ibcheckerrs '"$ca_info"' '$gflags' '$verbose' '$brief' " lid " " port))
system("'$IBPATH'/ibcheckerrs -S '"$ca_info"' '$gflags' '$verbose' '$brief' " lid " " port))
pcnterr++;
if (system("'$IBPATH'/ibcheckport'"$ca_info"' '$gflags' '$verbose' " lid " " port)) {
if (system("'$IBPATH'/ibcheckport -S '"$ca_info"' '$gflags' '$verbose' " lid " " port)) {
if (!'$v' && oldlid != lid) {
print "# Checked " ntype ": nodeguid 0x" nodeguid " with failure"
oldlid = lid
Expand All @@ -126,6 +126,7 @@ function check_node(lid, port)
/iberror:/ {print $0}
END {
printf "\n*** WARNING ***: this command is deprecated; Please use \"ibqueryerrors -f\""
printf "\n## Summary: %d nodes checked, %d bad nodes found\n", nnodes, ne
printf "## %d ports checked, %d bad ports found\n", nports, pe
printf "## %d ports have errors beyond threshold\n", pcnterr
Expand Down
8 changes: 8 additions & 0 deletions scripts/ibchecknode.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ guid_addr=""
bw=""
verbose=""
ca_info=""
suppress_deprecated="no"

while [ "$1" ]; do
case $1 in
Expand All @@ -56,6 +57,9 @@ while [ "$1" ]; do
ca_info="$ca_info $1 $2"
shift
;;
-S)
suppress_deprecated="yes"
;;
-*)
usage
;;
Expand All @@ -70,6 +74,10 @@ if [ -z "$1" ]; then
usage
fi

if [ "$suppress_deprecated" = "no" ]; then
echo "*** WARNING ***: this command is deprecated; Please use \"smpquery nodeinfo\"\n\n" 1>&2
fi

if [ "$guid_addr" ]; then
if ! lid=`$IBPATH/ibaddr $ca_info -G -L $1 | awk '/failed/{exit -1} {print $3}'`; then
echo -n "guid $1 address resolution: "
Expand Down
8 changes: 8 additions & 0 deletions scripts/ibcheckport.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ guid_addr=""
bw=""
verbose=""
ca_info=""
suppress_deprecated="no"

while [ "$1" ]; do
case $1 in
Expand All @@ -56,6 +57,9 @@ while [ "$1" ]; do
ca_info="$ca_info $1 $2"
shift
;;
-S)
suppress_deprecated="yes"
;;
-*)
usage
;;
Expand All @@ -72,6 +76,10 @@ fi

portnum=$2

if [ "$suppress_deprecated" = "no" ]; then
echo "*** WARNING ***: this command is deprecated\n\n" 1>&2
fi

if [ "$guid_addr" ]; then
if ! lid=`$IBPATH/ibaddr $ca_info -G -L $1 | awk '/failed/{exit -1} {print $3}'`; then
echo -n "guid $1 address resolution: "
Expand Down
8 changes: 8 additions & 0 deletions scripts/ibcheckportstate.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ guid_addr=""
bw=""
verbose=""
ca_info=""
suppress_deprecated="no"

while [ "$1" ]; do
case $1 in
Expand All @@ -44,6 +45,9 @@ while [ "$1" ]; do
-v)
verbose=yes
;;
-S)
suppress_deprecated="yes"
;;
-P | -C | -t | -timeout)
case $2 in
-*)
Expand Down Expand Up @@ -72,6 +76,10 @@ fi

portnum=$2

if [ "$suppress_deprecated" = "no" ]; then
echo "*** WARNING ***: this command is deprecated\n\n" 1>&2
fi

if [ "$guid_addr" ]; then
if ! lid=`$IBPATH/ibaddr $ca_info -G -L $1 | awk '/failed/{exit -1} {print $3}'`; then
echo -n "guid $1 address resolution: "
Expand Down
8 changes: 8 additions & 0 deletions scripts/ibcheckportwidth.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ guid_addr=""
bw=""
verbose=""
ca_info=""
suppress_deprecated="no"

while [ "$1" ]; do
case $1 in
Expand All @@ -44,6 +45,9 @@ while [ "$1" ]; do
-v)
verbose=yes
;;
-S)
suppress_deprecated="yes"
;;
-P | -C | -t | -timeout)
case $2 in
-*)
Expand Down Expand Up @@ -72,6 +76,10 @@ fi

portnum=$2

if [ "$suppress_deprecated" = "no" ]; then
echo "*** WARNING ***: this command is deprecated\n\n" 1>&2
fi

if [ "$guid_addr" ]; then
if ! lid=`$IBPATH/ibaddr $ca_info -G -L $1 | awk '/failed/{exit -1} {print $3}'`; then
echo -n "guid $1 address resolution: "
Expand Down
6 changes: 4 additions & 2 deletions scripts/ibcheckstate.in
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,14 @@ BEGIN {
function check_node(lid)
{
nodechecked=1
if (system("'$IBPATH'/ibchecknode'"$ca_info"' '$gflags' '$verbose' " lid)) {
if (system("'$IBPATH'/ibchecknode -S '"$ca_info"' '$gflags' '$verbose' " lid)) {
ne++
badnode=1
return
}
}
/^Ca/ || /^Switch/ || /^Rt/ {
nnodes++
ntype=$1; nodeguid=substr($3, 4, 16); ports=$2
Expand Down Expand Up @@ -113,7 +114,7 @@ function check_node(lid)
}
sub("\\(.*\\)", "", port)
gsub("[\\[\\]]", "", port)
if (system("'$IBPATH'/ibcheckportstate'"$ca_info"' '$gflags' '$verbose' " lid " " port)) {
if (system("'$IBPATH'/ibcheckportstate -S '"$ca_info"' '$gflags' '$verbose' " lid " " port)) {
if (!'$v' && oldlid != lid) {
print "# Checked " ntype ": nodeguid 0x" nodeguid " with failure"
oldlid = lid
Expand All @@ -128,6 +129,7 @@ function check_node(lid)
/iberror:/ {print $0}
END {
printf "\n*** WARNING ***: this command is deprecated\n"
printf "\n## Summary: %d nodes checked, %d bad nodes found\n", nnodes, ne
printf "## %d ports checked, %d ports with bad state found\n", nports, pe
}
Expand Down
5 changes: 3 additions & 2 deletions scripts/ibcheckwidth.in
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ BEGIN {
function check_node(lid)
{
nodechecked=1
if (system("'$IBPATH'/ibchecknode '"$ca_info"' '$gflags' '$verbose' " lid)) {
if (system("'$IBPATH'/ibchecknode -S '"$ca_info"' '$gflags' '$verbose' " lid)) {
ne++
badnode=1
return
Expand Down Expand Up @@ -113,7 +113,7 @@ function check_node(lid)
}
sub("\\(.*\\)", "", port)
gsub("[\\[\\]]", "", port)
if (system("'$IBPATH'/ibcheckportwidth '"$ca_info"' '$gflags' '$verbose' " lid " " port)) {
if (system("'$IBPATH'/ibcheckportwidth -S '"$ca_info"' '$gflags' '$verbose' " lid " " port)) {
if (!'$v' && oldlid != lid) {
print "# Checked " ntype ": nodeguid 0x" nodeguid " with failure"
oldlid = lid
Expand All @@ -128,6 +128,7 @@ function check_node(lid)
/iberror:/ {print $0}
END {
printf "\n*** WARNING ***: this command is deprecated\n"
printf "\n## Summary: %d nodes checked, %d bad nodes found\n", nnodes, ne
printf "## %d ports checked, %d ports with 1x width in error found\n", nports, pe
}
Expand Down
1 change: 1 addition & 0 deletions scripts/ibclearcounters.in
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ function clear_port_counters(lid, port)
/iberror:/ {print $0}
END {
printf "\n*** WARNING ***: this command is deprecated; Please use \"ibqueryerrors -K\"\n"
printf "\n## Summary: %d nodes cleared %d errors\n", nnodes, nodeerr
}
'
Expand Down
1 change: 1 addition & 0 deletions scripts/ibclearerrors.in
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ function clear_errors(lid, port)
/iberror:/ {print $0}
END {
printf "\n*** WARNING ***: this command is deprecated; Please use \"ibqueryerrors -k\"\n"
printf "\n## Summary: %d nodes cleared %d errors\n", nnodes, nodeerr
}
'
Expand Down
8 changes: 5 additions & 3 deletions scripts/ibdatacounters.in
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ BEGIN {
}
function check_node(lid, port)
{
if (system("'$IBPATH'/ibchecknode '"$ca_info"' '$gflags' '$verbose' " lid)) {
if (system("'$IBPATH'/ibchecknode -S '"$ca_info"' '$gflags' '$verbose' " lid)) {
ne++
print "\n# " ntype ": nodeguid 0x" nodeguid " failed"
return 1;
}
return system("'$IBPATH'/ibdatacounts '"$ca_info"' '$gflags' '$verbose' '$brief' " lid " " port);
return system("'$IBPATH'/ibdatacounts -S '"$ca_info"' '$gflags' '$verbose' '$brief' " lid " " port);
}
/^Ca/ || /^Switch/ || /^Rt/ {
Expand All @@ -112,7 +112,7 @@ function check_node(lid, port)
lid = substr(lid, 1, index(lid, " ") - 1)
check_node(lid, port)
} else if (err)
system("'$IBPATH'/ibdatacounts '"$ca_info"' '$gflags' '$verbose' '$brief' " lid " " port);
system("'$IBPATH'/ibdatacounts -S '"$ca_info"' '$gflags' '$verbose' '$brief' " lid " " port);
}
/^ib/ {print $0; next}
Expand All @@ -121,9 +121,11 @@ function check_node(lid, port)
/iberror:/ {print $0}
END {
printf "*** WARNING ***: this command is deprecated; Please use \"ibqueryerrors --counters\n"
printf "\n## Summary: %d nodes checked, %d bad nodes found\n", nnodes, ne
printf "## %d ports checked\n", nports
exit (ne )
}
'

exit $rv
8 changes: 8 additions & 0 deletions scripts/ibdatacounts.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ bw=""
verbose=""
brief=""
ca_info=""
suppress_deprecated="no"

while [ "$1" ]; do
case $1 in
Expand Down Expand Up @@ -63,6 +64,9 @@ while [ "$1" ]; do
ca_info="$ca_info $1 $2"
shift
;;
-S)
suppress_deprecated="yes"
;;
-*)
usage
;;
Expand Down Expand Up @@ -108,6 +112,10 @@ fi

nodename=`$IBPATH/smpquery $ca_info nodedesc $lid | sed -e "s/^Node Description:\.*\(.*\)/\1/"`

if [ "$suppress_deprecated" = "no" ]; then
echo "*** WARNING ***: this command is deprecated; Please use \"ibqueryerrors --counters\"\n\n" 1>&2
fi

text="`eval $IBPATH/perfquery $ca_info $lid $portnum`"
rv=$?
if echo "$text" | awk -v mono=$bw -v brief=$brief -F '[.:]*' '
Expand Down
9 changes: 9 additions & 0 deletions scripts/ibdiscover.pl
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/perl

printf (STDERR "*** WARNING ***; this command is deprecated;\n");
printf (STDERR " see ibnetdiscover cache features\n");
printf (STDERR " and/or iblinkinfo \"check\" features\n\n");

#
# Read mapfile
#
Expand Down Expand Up @@ -84,3 +88,8 @@
$val{$lg}, $val{$rg});
}
}

printf (STDERR "*** WARNING ***; this command is deprecated;\n");
printf (STDERR " see ibnetdiscover cache features\n");
printf (STDERR " and/or iblinkinfo \"check\" features\n\n");

4 changes: 3 additions & 1 deletion scripts/iblinkinfo.pl.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@

# this is now just a wrapper for the C based utility
$str = join " ",@ARGV;
exec "@IBSCRIPTPATH@/iblinkinfo $str";
system "@IBSCRIPTPATH@/iblinkinfo $str";
printf (STDERR "\n*** WARNING ***: this command has been replaced by iblinkinfo\n\n");

2 changes: 2 additions & 0 deletions scripts/ibprintca.pl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
use Getopt::Std;
use IBswcountlimits;

printf (STDERR "*** WARNING ***: this command is deprecated; Please use \"ibhosts\"\n\n");

# =========================================================================
#
sub usage_and_exit
Expand Down

0 comments on commit c670c59

Please sign in to comment.