Skip to content
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

Merged
merged 1 commit into from
May 12, 2017

Conversation

roclark
Copy link
Contributor

@roclark roclark commented May 11, 2017

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

@roclark
Copy link
Contributor Author

roclark commented May 11, 2017

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!

@SuperQ SuperQ requested review from grobie and SuperQ May 11, 2017 15:58
Copy link
Member

@SuperQ SuperQ left a 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

@@ -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":
Copy link
Member

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.

Copy link
Contributor Author

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>
@roclark roclark force-pushed the multiply-infiniband-lanes branch from 4c636f3 to 49d79b5 Compare May 11, 2017 18:51
@SuperQ SuperQ merged commit 58f50b3 into prometheus:master May 12, 2017
@roclark roclark deleted the multiply-infiniband-lanes branch May 12, 2017 14:01
oblitorum pushed a commit to shatteredsilicon/node_exporter that referenced this pull request Apr 9, 2024
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>
tamcore pushed a commit to gitgrave/node_exporter that referenced this pull request Oct 22, 2024
Signed-off-by: Felix Aronsson <felixaronsson@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infiniband counters are not bytes
3 participants