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

[inputs/diskio] Fix how major and minor identifiers of block devices are read. #5566

Merged
merged 3 commits into from
Mar 22, 2019

Commits on Mar 11, 2019

  1. Fix how major and minor identifiers of block devices are read.

    The current implementation assure that the major and the minor are
    coded on one byte. But they are not:
    
    ```
    brw-rw----  1 root disk    252, 290 Feb 25 11:36 dm-290
    ```
    
    290 as minor in this example is over 1 byte.
    
    So after wondering why all my devices iops weren't correctly stored,
    I found out that several points were added for some disks. For `dm-290`
    it was overriding `252:34`, instead of getting udev stats for `252:290`.
    
    The solution is here:
    https://sites.uclouvain.be/SystInfo/usr/include/sys/sysmacros.h.html
    
    The implementation is directly taken from this, fixing my bug.
    Soulou committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    92b01ab View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2019

  1. Configuration menu
    Copy the full SHA
    2118fbe View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2019

  1. [diskio] Force type of stat.Rdev uint64 for mipsle compatibility

    For most platforms, stat.Rdev is already a uint64 so this is without any effect
    for linux,mipsle, unix.Stat_t.Rdev is a uint32, but the way to compute major and minor doesn't change, casting the uint32 has no impact either
    Soulou committed Mar 21, 2019
    Configuration menu
    Copy the full SHA
    205de66 View commit details
    Browse the repository at this point in the history