Add Disk IO stats and ext4 FS stats#651
Merged
SuperQ merged 1 commit intoprometheus:masterfrom Sep 6, 2024
Merged
Conversation
Member
|
Looks like the tests still fail. Also DCO. This needs a DCO sign-off. You can use |
fecc6d2 to
3c2e1ec
Compare
Author
|
DCO sign off fixed. |
Member
|
Please |
1e6892d to
d9eaa12
Compare
Author
|
Done and ran |
7fa9f21 to
afabf5c
Compare
Author
|
Commits squashed and rebased with master |
371d88f to
31275d1
Compare
SuperQ
requested changes
Jul 20, 2024
internal/util/parse.go
Outdated
| if err != nil { | ||
| return 0, err | ||
| } | ||
| return strconv.ParseUint(strings.TrimSpace(string(data[2:])), 16, 64) |
Member
There was a problem hiding this comment.
This should validate that the string starts with 0x before trying to parse the value.
4d322a4 to
19c8632
Compare
SuperQ
requested changes
Aug 2, 2024
internal/util/parse.go
Outdated
| } | ||
| hexString := strings.TrimSpace(string(data)) | ||
| if !strings.HasPrefix(hexString, "0x") { | ||
| return 0, fmt.Errorf("invalid format: hex string does not start with '0x'") |
Member
There was a problem hiding this comment.
Suggested change
| return 0, fmt.Errorf("invalid format: hex string does not start with '0x'") | |
| return 0, errors.New("invalid format: hex string does not start with '0x'") |
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 <mhmdshahzeb1993@gmail.com>
4597172 to
6069bcb
Compare
SuperQ
approved these changes
Sep 6, 2024
fs185143
pushed a commit
to fs185143/procfs
that referenced
this pull request
Oct 2, 2024
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 <mhmdshahzeb1993@gmail.com>
fs185143
pushed a commit
to fs185143/procfs
that referenced
this pull request
Oct 2, 2024
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 <mhmdshahzeb1993@gmail.com> Signed-off-by: fs185143 <fs185143@ncr.com>
fs185143
pushed a commit
to fs185143/procfs
that referenced
this pull request
Nov 26, 2024
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 <mhmdshahzeb1993@gmail.com> Signed-off-by: fs185143 <fs185143@ncr.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to: prometheus/node_exporter#3005
Node exporter PR: prometheus/node_exporter#3047
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 commandsAdd function to return stats for ext4 filesystem
/sys/fs/ext4/<partition>/errors_count: number of ext4 errors (commit)/sys/fs/ext4/<partition>/warning_count: number of ext4 warning log messages (commit)/sys/fs/ext4/<partition>/msg_count: number of other ext4 log messages