[ofa-general] [PATCH] infiniband-diags/ibcheckerrors: for CAs query only single ports
Hal Rosenstock
hrosenstock at xsigo.com
Tue Dec 11 06:57:48 PST 2007
On Tue, 2007-12-11 at 13:46 +0000, Sasha Khapyorsky wrote:
> For CAs query performance counters only for single ports by lid and port
> number, and not whole node with 'all ports' option.
Should the description also reference the bug # ?
Will a similar thing be done to the other diag scripts which have this
same issue (but haven't been reported yet) ?
Would it be better to fix this in the underlying tool used (perfquery)
and in that way address it for all the diag scripts ?
-- Hal
> Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
> ---
> infiniband-diags/scripts/ibcheckerrors.in | 32 ++++++++++------------------
> 1 files changed, 12 insertions(+), 20 deletions(-)
>
> diff --git a/infiniband-diags/scripts/ibcheckerrors.in b/infiniband-diags/scripts/ibcheckerrors.in
> index cac2475..5cfabc6 100644
> --- a/infiniband-diags/scripts/ibcheckerrors.in
> +++ b/infiniband-diags/scripts/ibcheckerrors.in
> @@ -79,15 +79,15 @@ echo "$text" | awk '
> BEGIN {
> ne=0
> }
> -function check_node(lid)
> +function check_node(lid, port)
> {
> nodechecked=1
> if (system("'$IBPATH'/ibchecknode '"$ca_info"' '$gflags' '$verbose' " lid)) {
> ne++
> - badnode=1
> + print "\n# " ntype ": nodeguid 0x" nodeguid " failed"
> return
> }
> - if (system("'$IBPATH'/ibcheckerrs '"$ca_info"' '$gflags' '$verbose' '$brief' " lid " 255"))
> + if (system("'$IBPATH'/ibcheckerrs '"$ca_info"' '$gflags' '$verbose' '$brief' " lid " " port))
> nodeerr=1;
> }
>
> @@ -105,30 +105,22 @@ function check_node(lid)
>
> lid = substr($0, index($0, "port 0 lid ") + 11)
> lid = substr(lid, 1, index(lid, " ") - 1)
> - check_node(lid)
> + check_node(lid, 255)
> }
> /^\[/ {
> nports++
> port = $1
> - if (!nodechecked) {
> - lid = substr($0, index($0, " lid ") + 5)
> - lid = substr(lid, 1, index(lid, " ") - 1)
> - check_node(lid)
> - }
> - if (badnode) {
> - print "\n# " ntype ": nodeguid 0x" nodeguid " failed"
> - next
> - }
> sub("\\(.*\\)", "", port)
> gsub("[\\[\\]]", "", port)
> - if (nodeerr)
> - if (system("'$IBPATH'/ibcheckerrs '"$ca_info"' '$gflags' '$verbose' '$brief' " lid " " port)) {
> - if (!'$v' && oldlid != lid) {
> - print "# Checked " ntype ": nodeguid 0x" nodeguid " with failure"
> - oldlid = lid
> - }
> + if (ntype != "Switch") {
> + lid = substr($0, index($0, " lid ") + 5)
> + lid = substr(lid, 1, index(lid, " ") - 1)
> + check_node(lid, port)
> + if (nodeerr)
> pcnterr++;
> - }
> + } else if (nodeerr &&
> + system("'$IBPATH'/ibcheckerrs '"$ca_info"' '$gflags' '$verbose' '$brief' " lid " " port))
> + pcnterr++;
> }
>
> /^ib/ {print $0; next}
More information about the general
mailing list