Skip to content

Conversation

@brandonbell
Copy link
Contributor

Fixes regex parsing of large limits as well as changes from int64 to uint64. Also adjust unlimited to be 18446744073709551615.

This was realized while trying to parse the limits of ntp process on a Debian based system.

#338

Signed-off-by: Brandon Bell <bbell@invoca.com>
Signed-off-by: Brandon Bell <bbell@invoca.com>
Signed-off-by: Brandon Bell <bbell@invoca.com>
@SuperQ SuperQ mentioned this pull request Jan 11, 2021
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.

LGTM, Thanks! I found the same problem and didn't check to see if someone had already opened a bugfix. 🤦

@SuperQ SuperQ merged commit f159672 into prometheus:master Jan 11, 2021
SuperQ added a commit to SuperQ/process-exporter that referenced this pull request Jan 11, 2021
Update to latest modules, mainly to pick up procfs v0.3.0. Fixes a
parsing bug in `/proc/<pid>/limits`[0].

[0]: prometheus/procfs#340

Signed-off-by: Ben Kochie <superq@gmail.com>
remijouannet pushed a commit to remijouannet/procfs that referenced this pull request Oct 20, 2022
Linux limits are uint64, not int64[0]. "unlimited" is also defined as
max uint64.

[0]: https://github.com/torvalds/linux/blob/7c53f6b671f4aba70ff15e1b05148b10d58c2837/include/uapi/linux/resource.h#L48-L53

Signed-off-by: Brandon Bell <bbell@invoca.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.

2 participants