gopsutil icon indicating copy to clipboard operation
gopsutil copied to clipboard

[disk][linux] support new stats available with 4.18 and 5.5 kernels

Open scop opened this issue 3 years ago • 4 comments
trafficstars

https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats

scop avatar Mar 04 '22 16:03 scop

Thank you for your contribution. However, we don't want to add Linux specific information.

shirou avatar Mar 12 '22 11:03 shirou

I don't think this is any more Linux specific than what we already have in IOCountersStat. Before this change, it currently has 11 counter-like members, only 6 of which are populated on Windows, 4 on OpenBSD, 7 on FreeBSD, etc.

Secondly, I see no reason why these members couldn't be populated on other OS's as well, if they provide such info -- to me discards and flushes seem fairly generic in nature, and not really something deeply implementation/OS specific.

scop avatar Mar 12 '22 13:03 scop

One more reason is psutil doesn't have that fields.

shirou avatar Mar 13 '22 12:03 shirou

To me not having something in psutil is not a reason not to improve gopsutil.

scop avatar Mar 19 '22 20:03 scop