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

feat(blockdevice): added sysblockdevicesize method and test #658

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

fs185143
Copy link

@fs185143 fs185143 commented Aug 14, 2024

In part to support prometheus/node_exporter#3068, I have added a new method that retrieves the value of /sys/block/<device>/size

@fs185143
Copy link
Author

fixed DCO and tests with this new PR

cc @dswarbrick

@js185692
Copy link

js185692 commented Sep 5, 2024

Hi @discordianfish, would it be possible to get your review on this PR? Thanks.

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 in general though

cgzones and others added 17 commits October 2, 2024 15:28
Add interfaces to read the SELinux AVC runtime statistics from
/sys/fs/selinux/avc/cache_stats and /sys/fs/selinux/avc/hash_stats.

Refactored from prometheus/node_exporter#2418

Signed-off-by: Christian Göttsche <[email protected]>
Signed-off-by: fs185143 <[email protected]>
Signed-off-by: prombot <[email protected]>
Signed-off-by: fs185143 <[email protected]>
The NSpids field uses a tab (\t) to separate the list of PIDs. The
procfs parser should split on \t, rather than space. This was not caught
because the test fixtures themselves used the space character.

The patch updates the parser, the fixtures, and adds an explicit test
for NSpids.

Signed-off-by: Timur Alperovich <[email protected]>
Signed-off-by: fs185143 <[email protected]>
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.20.0 to 0.21.0.
- [Commits](golang/sys@v0.20.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: fs185143 <[email protected]>
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.21.0 to 0.22.0.
- [Commits](golang/sys@v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: fs185143 <[email protected]>
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.22.0 to 0.24.0.
- [Commits](golang/sys@v0.22.0...v0.24.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: fs185143 <[email protected]>
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.7.0 to 0.8.0.
- [Commits](golang/sync@v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: fs185143 <[email protected]>
Adds function to return disk stats from:
* /sys/block/<disk>/device/ioerr_cnt: number of SCSI commands that completed with an error
* /sys/block/<disk>/device/iodone_cnt: number of completed or rejected SCSI commands

Add function to return stats for ext4 filesystem
* /sys/fs/ext4/<partition>/errors_count: number of ext4 errors
* /sys/fs/ext4/<partition>/warning_count: number of ext4 warning log messages
* /sys/fs/ext4/<partition>/msg_count: number of other ext4 log messages

Signed-off-by: Muhammad Shahzeb <[email protected]>
Signed-off-by: fs185143 <[email protected]>
@fs185143
Copy link
Author

@discordianfish mind taking another look at this please? thanks 😄

@fs185143
Copy link
Author

@discordianfish thanks :) didn't seem to get merged automatically? I merged master in in case that was the issue, but now says a workflow is awaiting approval.

@discordianfish
Copy link
Member

@SuperQ needs to review this first

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.

9 participants