[ofa-general] [PATCH] infiniband-diags/dump_lfts.sh: fix -D format parsing
Sasha Khapyorsky
sashak at voltaire.com
Sun Jan 25 02:07:04 PST 2009
DR format was changed slightly - fix format parsing accordingly.
Also as Ira suggested use '-s' (show) option with ibnetdiscover instead
of -v (verbose) - it produces less output.
Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
infiniband-diags/scripts/dump_lfts.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/infiniband-diags/scripts/dump_lfts.sh b/infiniband-diags/scripts/dump_lfts.sh
index ebca705..a07c211 100755
--- a/infiniband-diags/scripts/dump_lfts.sh
+++ b/infiniband-diags/scripts/dump_lfts.sh
@@ -22,8 +22,8 @@ done
dump_by_dr_path ()
{
-for sw_dr in `ibnetdiscover $ca_info -v \
- | sed -ne '/^DR path .* switch /s/^DR path \([,|0-9]\+\) ->.*{\([0-9|a-f]\+\)}.*$/\2 \1/p' \
+for sw_dr in `ibnetdiscover $ca_info -s \
+ | sed -ne '/^DR path .* switch /s/^DR path .*; \([,|0-9]\+\) ->.*{\([0-9|a-f]\+\)}.*$/\2 \1/p' \
| sort -u \
| awk 'BEGIN {guid=0;} {if ($1 != guid) { guid=$1; print $2; }}'` ; do
ibroute $ca_info -D ${sw_dr}
--
1.6.0.4.766.g6fc4a
More information about the general
mailing list