mirror of
https://github.com/pgsty/minio.git
synced 2026-07-22 05:30:24 +03:00
Read drive IO stats from sysfs instead of procfs (#19131)
Currently, we read from `/proc/diskstats` which is found to be un-reliable in k8s environments. We can read from `sysfs` instead. Also, cache the latest drive io stats to find the diff and update the metrics.
This commit is contained in:
@@ -40,15 +40,6 @@ type Info struct {
|
||||
NRRequests uint64
|
||||
}
|
||||
|
||||
// DevID is the drive major and minor ids
|
||||
type DevID struct {
|
||||
Major uint32
|
||||
Minor uint32
|
||||
}
|
||||
|
||||
// AllDrivesIOStats is map between drive devices and IO stats
|
||||
type AllDrivesIOStats map[DevID]IOStats
|
||||
|
||||
// IOStats contains stats of a single drive
|
||||
type IOStats struct {
|
||||
ReadIOs uint64
|
||||
|
||||
Reference in New Issue
Block a user