Skip to content

Comments

Parse /proc/net/protocols#347

Merged
SuperQ merged 9 commits intoprometheus:masterfrom
juancb:net-protocols
Jan 11, 2021
Merged

Parse /proc/net/protocols#347
SuperQ merged 9 commits intoprometheus:masterfrom
juancb:net-protocols

Conversation

@juancb
Copy link
Contributor

@juancb juancb commented Jan 4, 2021

This patch adds support for extracting system socket metrics found only in /proc/net/protocols. The most interesting metrics found here are per-protocol socket counts along with the total memory in pages used by each. For TCP connections this data can be used to tune/monitor a system against the thresholds set in net.ipv4.tcp_mem. This file also exposes a pressure metric which indicates whether or not a protocol like TCP has entered memory pressure, which again is useful in troubleshooting things like memory pressure induced packet drops on loopback.

Some additional albeit less interesting metrics that come out of this file include the size of each protocol's struct, and the maximum header size the kernel is willing to allocate.

The additional columns enumerate capabilities per-protocol and are encoded as bools.

Juan Bran added 8 commits January 4, 2021 15:48
Signed-off-by: Juan Bran <juan.bran@verizondigitalmedia.com>
Signed-off-by: Juan Bran <juan.bran@verizondigitalmedia.com>
Signed-off-by: Juan Bran <juan.bran@verizondigitalmedia.com>
Signed-off-by: Juan Bran <juan.bran@verizondigitalmedia.com>
Signed-off-by: Juan Bran <juan.bran@verizondigitalmedia.com>
Signed-off-by: Juan Bran <juan.bran@verizondigitalmedia.com>
Signed-off-by: Juan Bran <juan.bran@verizondigitalmedia.com>
Signed-off-by: Juan Bran <juan.bran@verizondigitalmedia.com>
Signed-off-by: Juan Bran <juan.bran@verizondigitalmedia.com>
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.

LGTM

@SuperQ SuperQ merged commit adee02f into prometheus:master Jan 11, 2021
remijouannet pushed a commit to remijouannet/procfs that referenced this pull request Oct 20, 2022
This patch adds support for extracting system socket metrics found only in /proc/net/protocols. The most interesting metrics found here are per-protocol socket counts along with the total memory in pages used by each. For TCP connections this data can be used to tune/monitor a system against the thresholds set in net.ipv4.tcp_mem. This file also exposes a pressure metric which indicates whether or not a protocol like TCP has entered memory pressure, which again is useful in troubleshooting things like memory pressure induced packet drops on loopback.

Some additional albeit less interesting metrics that come out of this file include the size of each protocol's struct, and the maximum header size the kernel is willing to allocate.

The additional columns enumerate capabilities per-protocol and are encoded as bools.

Signed-off-by: Juan Bran <juan.bran@verizondigitalmedia.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.

3 participants