Skip to content

Commit

Permalink
Handle switches with split mode enabled (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock authored Aug 23, 2022
1 parent 99ea843 commit 1fde23f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions collectors/fixtures/ibnetdiscover/test.out
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ SW 1719 11 0x7cfe9003009ce5b0 4x EDR - CA 133 1 0x7cfe9003003b4b96 ( 'ib-i1l
SW 1719 1 0x7cfe9003009ce5b0 4x EDR - SW 1516 1 0x7cfe900300b07320 ( 'ib-i1l1s01' - 'ib-i1l2s01' )
SW 2052 35 0x506b4b03005c2740 4x EDR - CA 1432 1 0x506b4b0300cc02a6 ( 'ib-i4l1s01' - 'p0001 HCA-1' )
SW 2052 37 0x506b4b03005c2740 4x ??? 'ib-i4l1s01'
SW 1781 80 0x08c0eb0300add20e 4x SDR 'ib-i7l2s01'

4 changes: 4 additions & 0 deletions collectors/ibnetdiscover.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ func ibnetdiscoverParse(out string, logger log.Logger) (*[]InfinibandDevice, *[]
level.Debug(logger).Log("msg", "Skipping line that is not connected", "line", line)
continue
}
if items[5] == "SDR" && len(items) == 7 {
level.Debug(logger).Log("msg", "Skipping split mode port", "line", line)
continue
}
guid := items[3]
portNumber := items[2]
var device InfinibandDevice
Expand Down

0 comments on commit 1fde23f

Please sign in to comment.