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

Add isolated cpu parsing #427

Merged

Conversation

DavidVentura
Copy link
Contributor

@DavidVentura DavidVentura commented Dec 15, 2021

Hi
This PR adds support for parsing /sys/devices/system/cpu/isolated
Prompted by this PR for node_exporter

I am not sure if this should be a uint16 or not.

Signed-off-by: david <davidventura27@gmail.com>
sysfs/system_cpu.go Outdated Show resolved Hide resolved
sysfs/system_cpu.go Outdated Show resolved Hide resolved
sysfs/system_cpu.go Outdated Show resolved Hide resolved
sysfs/system_cpu.go Outdated Show resolved Hide resolved
@discordianfish
Copy link
Member

Beside that, looks good - especially for a first time go contribution 🥳

Signed-off-by: david <davidventura27@gmail.com>
Signed-off-by: david <davidventura27@gmail.com>
sysfs/system_cpu.go Outdated Show resolved Hide resolved
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.

Beside that last nit, LGTM. Thanks!

Signed-off-by: david <davidventura27@gmail.com>
Signed-off-by: david <davidventura27@gmail.com>
Signed-off-by: david <davidventura27@gmail.com>
@discordianfish discordianfish merged commit c6f5590 into prometheus:master Dec 20, 2021
remijouannet pushed a commit to remijouannet/procfs that referenced this pull request Oct 20, 2022
* Add isolated cpu parsing

Signed-off-by: david <davidventura27@gmail.com>

* Address PR comments

Signed-off-by: david <davidventura27@gmail.com>

* Fix start/end range message

Signed-off-by: david <davidventura27@gmail.com>

* rename to parseIsolatedCPUs

Signed-off-by: david <davidventura27@gmail.com>

* Do not wrap error

Signed-off-by: david <davidventura27@gmail.com>

* also check error is nil

Signed-off-by: david <davidventura27@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.

None yet

3 participants