Conversation
pgier
approved these changes
May 28, 2019
Collaborator
pgier
left a comment
There was a problem hiding this comment.
LGTM, although I'm still a bit confused about why the problem occurred. AFAICT, the kernel sources store the time in nanoseconds as a signed int64 (https://github.com/torvalds/linux/blob/master/include/linux/ktime.h#L27) and then divide to convert the milliseconds before printing (https://github.com/torvalds/linux/blob/master/net/sunrpc/stats.c#L224). So I would think the max value that could appear in mountstats would be (max int64)/1000000.
If this was on an older kernel, maybe it was still using the older unsigned long long format?(torvalds/linux@ff83997#diff-4efb17a470df6029d642a329c7a42123).
Member
Author
|
Yes, the example data came from a RHEL 7.3 system, 3.10 kernel. |
297bd8b to
f18cce3
Compare
Don't use time.Duration for mountstats timing data. These values can be large uint64 milliseconds values and easily overflow time.Duration (in64 nanoseconds). Return the raw time in milliseconds. Signed-off-by: Ben Kochie <superq@gmail.com>
f18cce3 to
2539d54
Compare
SuperQ
added a commit
to prometheus/node_exporter
that referenced
this pull request
May 30, 2019
* Update procfs vendor to pull in github.com/prometheus/procfs/pull/165 * Update mountstats collector to use new types. * Rollover counter automatically to avoid float64 accuracy issues. * Update e2e test. Signed-off-by: Ben Kochie <superq@gmail.com>
This was referenced May 30, 2019
SuperQ
added a commit
to prometheus/node_exporter
that referenced
this pull request
May 31, 2019
* Update procfs vendor to pull in github.com/prometheus/procfs/pull/165 * Update mountstats collector to use new types. * Rollover counter automatically to avoid float64 accuracy issues. * Update e2e test. Signed-off-by: Ben Kochie <superq@gmail.com>
SuperQ
added a commit
to prometheus/node_exporter
that referenced
this pull request
May 31, 2019
* Update procfs vendor to pull in github.com/prometheus/procfs/pull/165 * Update mountstats collector to use new types. * Rollover counter automatically to avoid float64 accuracy issues. * Update e2e test. Signed-off-by: Ben Kochie <superq@gmail.com>
SuperQ
added a commit
to prometheus/node_exporter
that referenced
this pull request
Jun 4, 2019
* Update procfs vendor to pull in github.com/prometheus/procfs/pull/165 * Update mountstats collector to use new types. * Rollover counter automatically to avoid float64 accuracy issues. * Update e2e test. Signed-off-by: Ben Kochie <superq@gmail.com>
SuperQ
added a commit
to prometheus/node_exporter
that referenced
this pull request
Jun 4, 2019
* Update procfs vendor to pull in github.com/prometheus/procfs/pull/165 * Update mountstats collector to use new types. * Rollover counter automatically to avoid float64 accuracy issues. * Update e2e test. Signed-off-by: Ben Kochie <superq@gmail.com>
bobrik
pushed a commit
to bobrik/procfs
that referenced
this pull request
Jan 14, 2023
Do not run test_task in parallel with other tests
oblitorum
pushed a commit
to shatteredsilicon/node_exporter
that referenced
this pull request
Apr 9, 2024
* Update procfs vendor to pull in github.com/prometheus/procfs/pull/165 * Update mountstats collector to use new types. * Rollover counter automatically to avoid float64 accuracy issues. * Update e2e test. Signed-off-by: Ben Kochie <superq@gmail.com>
oblitorum
pushed a commit
to shatteredsilicon/node_exporter
that referenced
this pull request
Apr 9, 2024
* Update procfs vendor to pull in github.com/prometheus/procfs/pull/165 * Update mountstats collector to use new types. * Rollover counter automatically to avoid float64 accuracy issues. * Update e2e test. Signed-off-by: Ben Kochie <superq@gmail.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.
Don't use time.Duration for mountstats timing data. These values can be
large uint64 milliseconds values and easily overflow time.Duration
(in64 nanoseconds). Return the raw time in milliseconds.
Signed-off-by: Ben Kochie superq@gmail.com