Skip to content

Add /proc/interrupts support - #475

Merged
SuperQ merged 1 commit into
prometheus:masterfrom
Dentrax:interrupts
Dec 17, 2022
Merged

SuperQ merged 1 commit into
prometheus:masterfrom
Dentrax:interrupts

Conversation

@Dentrax

@Dentrax Dentrax commented Nov 2, 2022

Copy link
Copy Markdown
Contributor

Signed-off-by: Furkan furkan.turkal@trendyol.com

I have some use-cases for this implementation:

  • want to parse my /proc/interrupts file using procfs package (with go:linkname)
  • move interrupt parsing logic from node_exporter to here
  • also supports single values

All tests passes.

@Dentrax Dentrax changed the title add /proc/interrupts Add /proc/interrupts support Nov 2, 2022
@Dentrax

Dentrax commented Nov 2, 2022

Copy link
Copy Markdown
Contributor Author

I was manually update the fixture so it fails. Now just followed Updating Test Fixtures instructions but I couldn't get exactly:

$ make fixtures/.unpacked
make: *** No rule to make target `fixtures/.unpacked'.  Stop.
$ make test
>> extracting fixtures testdata/fixtures
./ttar -C testdata/ -x -f testdata/fixtures.ttar
WARNING sed unable to handle null bytes, using Python (slow).

I almost waited ~5-10m but nothing happens, the process hangs, I guess. (macOS)

Feel free to commit my branch to update fixture!

Edit: It seems tests are now passing.

Comment thread proc_interrupts.go

@discordianfish discordianfish left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@SuperQ SuperQ left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Minor nit about copyright dates. Otherwise LGTM.

Comment thread proc_interrupts.go Outdated
Comment thread proc_interrupts_test.go Outdated

@SuperQ SuperQ left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just need to update the dates.

Signed-off-by: Furkan <furkan.turkal@trendyol.com>
@Dentrax

Dentrax commented Dec 17, 2022

Copy link
Copy Markdown
Contributor Author

Just need to update the dates.

Done!

@SuperQ
SuperQ merged commit 42aaf8e into prometheus:master Dec 17, 2022
jritter pushed a commit to jritter/procfs that referenced this pull request Jul 15, 2024
Signed-off-by: Furkan <furkan.turkal@trendyol.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