Skip to content

Commit

Permalink
Documentation / comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dswarbrick committed May 14, 2017
1 parent c386c06 commit e95ac92
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,21 @@ FabricMon's web interface, based on the d3.js graph library, and displayed as
an SVG force graph.

This project is a work in progress, in the early stages of development.

Building FabricMon
------------------
To build FabricMon, you will require the following development libraries
(Debian package names shown):

* libibmad-dev
* libibumad-dev
* libibnetdisc-dev

The corresponding runtime libraries will be required on the target system
unless you build the FabricMon binary with static linking.

InfiniBand Counters
-------------------
Note that counters that represent data (e.g. PortXmitData and PortRcvData) are
divided by four (lanes). See https://community.mellanox.com/docs/DOC-2572 for
more information.
7 changes: 4 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ func iterateSwitches(f *Fabric, nnMap *NodeNameMap, conf influxdbConf) {
capMask := nativeEndian.Uint16(buf[2:4])
fmt.Printf("Cap Mask: %#02x\n", ntohs(capMask))

// Note: In PortCounters, PortCountersExtended, PortXmitDataSL, and
// PortRcvDataSL, components that represent Data (e.g. PortXmitData and
// PortRcvData) indicate octets divided by 4 rather than just octets.

// Fetch standard (32 bit, some 16 bit) counters
pmaBuf = C.pma_query_via(unsafe.Pointer(&buf), &portid, C.int(portNum), PMA_TIMEOUT, C.IB_GSI_PORT_COUNTERS, f.ibmadPort)

Expand Down Expand Up @@ -215,9 +219,6 @@ func iterateSwitches(f *Fabric, nnMap *NodeNameMap, conf influxdbConf) {
pmaBuf = C.pma_query_via(unsafe.Pointer(&buf), &portid, C.int(portNum), PMA_TIMEOUT, C.IB_GSI_PORT_COUNTERS_EXT, f.ibmadPort)

if pmaBuf != nil {
// Note: In PortCounters, PortCountersExtended, PortXmitDataSL, and
// PortRcvDataSL, components that represent Data (e.g. PortXmitData and
// PortRcvData) indicate octets divided by 4 rather than just octets.
for counter, displayName := range extCounterMap {
tags["counter"] = displayName
fields["value"] = getCounterUint32(pmaBuf, counter)
Expand Down

0 comments on commit e95ac92

Please sign in to comment.