Files
telegraf/plugins/inputs
Daniel Nelson 9ba023fd67 [inputs/diskio] Fix how major and minor identifiers of block devices are read. (#5566)
* 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.

* Use unix.Major/unix.Minor instead of custom implementation

* [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
2019-03-22 14:03:48 -07:00
..
2018-05-21 11:59:39 -07:00
2017-12-14 16:03:29 -08:00
2017-04-24 11:13:26 -07:00
2017-09-26 15:25:57 -07:00
2018-11-09 16:43:15 -08:00
2018-12-18 14:23:25 -08:00
2019-01-07 17:14:07 -08:00
2018-08-22 19:10:40 -07:00
2018-11-02 10:59:14 -07:00
2018-08-24 14:58:41 -07:00
2017-04-24 11:13:26 -07:00
2018-09-11 15:15:45 -07:00
2017-10-31 17:00:06 -07:00
2019-01-23 17:26:50 -08:00
2019-01-07 17:14:07 -08:00
2018-01-30 12:04:21 -08:00
2018-05-04 16:33:23 -07:00
2018-04-04 18:35:05 -07:00
2018-04-06 16:20:36 -07:00
2019-03-08 14:30:38 -08:00
2018-11-29 16:07:56 -08:00
2018-08-14 14:35:39 -06:00
2018-12-18 14:23:25 -08:00
2018-06-07 12:35:46 -07:00
2018-05-04 16:33:23 -07:00