Skip to content

Comments

Use InfiniBandClass from procfs library#1396

Merged
discordianfish merged 1 commit intoprometheus:masterfrom
bdrung:use-infinibandclass
Sep 23, 2019
Merged

Use InfiniBandClass from procfs library#1396
discordianfish merged 1 commit intoprometheus:masterfrom
bdrung:use-infinibandclass

Conversation

@bdrung
Copy link
Contributor

@bdrung bdrung commented Jun 25, 2019

Parsing the sysfs files for InfiniBand was added to the procfs library (see prometheus/procfs#164).

Therefore use InfiniBandClass from the procfs library instead of parsing sysfs itself.

@bdrung bdrung force-pushed the use-infinibandclass branch 2 times, most recently from a691e8a to 11b44ea Compare June 26, 2019 07:39
@bdrung bdrung force-pushed the use-infinibandclass branch 3 times, most recently from 11de3e8 to 984ee99 Compare July 1, 2019 11:13
@bdrung
Copy link
Contributor Author

bdrung commented Jul 1, 2019

The check on buildkite failed, but it requires one to have an account to see the failure. Then I created an account, but https://buildkite.com/prometheus/node-exporter/builds/1923 just shows "Page not found".

@SuperQ
Copy link
Member

SuperQ commented Jul 1, 2019

Yes, sorry, we still don't have public access to buildkite yet. The collector/fixtures/e2e-64k-page-output.txt needs to be updated with the new metrics.

collector/fixtures/e2e-64k-page-output.txt	2019-07-01 06:08:01.000000000 -0400 | 0s
-- | --
  | /tmp/node_exporter_e2e_test.WllUvq/e2e-output.txt	2019-07-01 07:27:36.397893472 -0400 | 0s
  | @@ -810,12 +810,10 @@
  | node_infiniband_legacy_unicast_packets_transmitted_total{device="mlx4_0",port="2"} 61239
  | # HELP node_infiniband_link_downed_total Number of times the link failed to recover from an error state and went down
  | # TYPE node_infiniband_link_downed_total counter
  | -node_infiniband_link_downed_total{device="i40iw0",port="1"} 0
  | node_infiniband_link_downed_total{device="mlx4_0",port="1"} 0
  | node_infiniband_link_downed_total{device="mlx4_0",port="2"} 0
  | # HELP node_infiniband_link_error_recovery_total Number of times the link successfully recovered from an error state
  | # TYPE node_infiniband_link_error_recovery_total counter
  | -node_infiniband_link_error_recovery_total{device="i40iw0",port="1"} 0
  | node_infiniband_link_error_recovery_total{device="mlx4_0",port="1"} 0
  | node_infiniband_link_error_recovery_total{device="mlx4_0",port="2"} 0
  | # HELP node_infiniband_multicast_packets_received_total Number of multicast packets received (including errors)
  | @@ -828,20 +826,16 @@
  | node_infiniband_multicast_packets_transmitted_total{device="mlx4_0",port="2"} 0
  | # HELP node_infiniband_port_constraint_errors_received_total Number of packets received on the switch physical port that are discarded
  | # TYPE node_infiniband_port_constraint_errors_received_total counter
  | -node_infiniband_port_constraint_errors_received_total{device="i40iw0",port="1"} 0
  | node_infiniband_port_constraint_errors_received_total{device="mlx4_0",port="1"} 0
  | # HELP node_infiniband_port_constraint_errors_transmitted_total Number of packets not transmitted from the switch physical port
  | # TYPE node_infiniband_port_constraint_errors_transmitted_total counter
  | -node_infiniband_port_constraint_errors_transmitted_total{device="i40iw0",port="1"} 0
  | node_infiniband_port_constraint_errors_transmitted_total{device="mlx4_0",port="1"} 0
  | # HELP node_infiniband_port_data_received_bytes_total Number of data octets received on all links
  | # TYPE node_infiniband_port_data_received_bytes_total counter
  | -node_infiniband_port_data_received_bytes_total{device="i40iw0",port="1"} 0
  | node_infiniband_port_data_received_bytes_total{device="mlx4_0",port="1"} 1.8527668e+07
  | node_infiniband_port_data_received_bytes_total{device="mlx4_0",port="2"} 0
  | # HELP node_infiniband_port_data_transmitted_bytes_total Number of data octets transmitted on all links
  | # TYPE node_infiniband_port_data_transmitted_bytes_total counter
  | -node_infiniband_port_data_transmitted_bytes_total{device="i40iw0",port="1"} 0
  | node_infiniband_port_data_transmitted_bytes_total{device="mlx4_0",port="1"} 1.493376e+07
  | node_infiniband_port_data_transmitted_bytes_total{device="mlx4_0",port="2"} 0
  | # HELP node_infiniband_port_discards_received_total Number of inbound packets discarded by the port because the port is down or congested
  | @@ -849,23 +843,18 @@
  | node_infiniband_port_discards_received_total{device="mlx4_0",port="1"} 0
  | # HELP node_infiniband_port_discards_transmitted_total Number of outbound packets discarded by the port because the port is down or congested
  | # TYPE node_infiniband_port_discards_transmitted_total counter
  | -node_infiniband_port_discards_transmitted_total{device="i40iw0",port="1"} 0
  | node_infiniband_port_discards_transmitted_total{device="mlx4_0",port="1"} 5
  | # HELP node_infiniband_port_errors_received_total Number of packets containing an error that were received on this port
  | # TYPE node_infiniband_port_errors_received_total counter
  | -node_infiniband_port_errors_received_total{device="i40iw0",port="1"} 0
  | node_infiniband_port_errors_received_total{device="mlx4_0",port="1"} 0
  | # HELP node_infiniband_port_packets_received_total Number of packets received on all VLs by this port (including errors)
  | # TYPE node_infiniband_port_packets_received_total counter
  | -node_infiniband_port_packets_received_total{device="i40iw0",port="1"} 0
  | node_infiniband_port_packets_received_total{device="mlx4_0",port="1"} 6.825908347e+09
  | # HELP node_infiniband_port_packets_transmitted_total Number of packets transmitted on all VLs from this port (including errors)
  | # TYPE node_infiniband_port_packets_transmitted_total counter
  | -node_infiniband_port_packets_transmitted_total{device="i40iw0",port="1"} 0
  | node_infiniband_port_packets_transmitted_total{device="mlx4_0",port="1"} 6.235865e+06
  | # HELP node_infiniband_port_transmit_wait_total Number of ticks during which the port had data to transmit but no data was sent during the entire tick
  | # TYPE node_infiniband_port_transmit_wait_total counter
  | -node_infiniband_port_transmit_wait_total{device="i40iw0",port="1"} 0
  | node_infiniband_port_transmit_wait_total{device="mlx4_0",port="1"} 4.294967295e+09
  | # HELP node_infiniband_unicast_packets_received_total Number of unicast packets received (including errors)
  | # TYPE node_infiniband_unicast_packets_received_total counter

@bdrung bdrung force-pushed the use-infinibandclass branch from 984ee99 to 6e4155e Compare July 1, 2019 12:36
@bdrung
Copy link
Contributor Author

bdrung commented Jul 1, 2019

Thanks. I have adjusted collector/fixtures/e2e-64k-page-output.txt too.

Copy link
Member

@discordianfish discordianfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Contributor

@pgier pgier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Parsing the sysfs files for InfiniBand was added to the procfs library
(see prometheus/procfs#164).

Therefore use `InfiniBandClass` from the procfs library instead of
parsing sysfs itself.

If the port counter return `N/A (no PMA)` no metric will be returned
(instead of returning 0 for this metric.

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
@bdrung bdrung force-pushed the use-infinibandclass branch from 6e4155e to 7a2d79a Compare August 28, 2019 17:35
@bdrung
Copy link
Contributor Author

bdrung commented Sep 3, 2019

Any updates on this pull request?

@discordianfish discordianfish merged commit 27b8c93 into prometheus:master Sep 23, 2019
@discordianfish
Copy link
Member

Sorry that this kept lingering around! Thanks!

@bdrung bdrung deleted the use-infinibandclass branch February 20, 2020 11:46
oblitorum pushed a commit to shatteredsilicon/node_exporter that referenced this pull request Apr 9, 2024
Parsing the sysfs files for InfiniBand was added to the procfs library
(see prometheus/procfs#164).

Therefore use `InfiniBandClass` from the procfs library instead of
parsing sysfs itself.

If the port counter return `N/A (no PMA)` no metric will be returned
(instead of returning 0 for this metric.

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
oblitorum pushed a commit to shatteredsilicon/node_exporter that referenced this pull request Apr 9, 2024
Parsing the sysfs files for InfiniBand was added to the procfs library
(see prometheus/procfs#164).

Therefore use `InfiniBandClass` from the procfs library instead of
parsing sysfs itself.

If the port counter return `N/A (no PMA)` no metric will be returned
(instead of returning 0 for this metric.

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.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.

4 participants