-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiply port data XMIT/RCV metrics by 4 #579
Conversation
Haven't heard anything on #573 so I decided to go ahead an make a change. Let me know if this is the desired way to fix the issue, otherwise I can refactor however anyone sees fit! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than comment about docs, LGTM
collector/infiniband_linux.go
Outdated
@@ -148,6 +148,11 @@ func readMetric(directory, metricFile string) (uint64, error) { | |||
return 0, err | |||
} | |||
|
|||
switch metricFile { | |||
case "port_rcv_data", "port_xmit_data", "port_rcv_data_64", "port_xmit_data_64": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe put a comment here about why we're doing this, either link to docs, or link to issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call - I'm on it!
According to Mellanox, it is standard practice that the port_xmit_data and port_rcv_data files are split into 4 lanes. To get the actual transmit and receive values for each port, the metric needs to be multiplied by 4. Signed-Off-By: Robert Clark <robert.d.clark@hpe.com>
4c636f3
to
49d79b5
Compare
According to Mellanox, it is standard practice that the port_xmit_data and port_rcv_data files are split into 4 lanes. To get the actual transmit and receive values for each port, the metric needs to be multiplied by 4. Signed-Off-By: Robert Clark <robert.d.clark@hpe.com>
Signed-off-by: Felix Aronsson <felixaronsson@gmail.com>
According to Mellanox, it is standard practice that the port_xmit_data and port_rcv_data
files are split into 4 lanes. To get the actual transmit and receive values for each
port, the metric needs to be multiplied by 4.
If applied, this fixes #573.
Signed-Off-By: Robert Clark robert.d.clark@hpe.com