procfs
procfs copied to clipboard
Add support for several /sys/class/sas_* classes
This adds support for several SAS classes from /sys/class
:
-
sas_host
-
sas_device
-
sas_end_device
-
sas_expander
-
sas_phy
-
sas_port
These are for issue #452, which is needed for https://github.com/prometheus/node_exporter/issues/2386. Once that is complete, it'll be possible to track SAS communication errors on each individual SAS link in a system, and then map those links to specific block devices.
Use case: I recently discovered that I had a bad SAS cable in my system and was seeing weird, intermittent disk timeouts and errors which caused ZFS problems. Being able to track SAS issues for each node should make detecting and debugging this sort of problem much easier.
Some minor comments but LGTM in general. Thanks!
I started writing my node_exporter
code, and found a couple bugs, which I just fixed. There are also a couple convenience functions that should really be in here. I may or may not have time for them today.
Okay, that ended up being bigger than expected. OTOH, the node_exporter
code shrank quite a bit, especially the bits where it has to chain through multiple classes to find some random bit of data. Let me know if there's a different pattern that you'd like to see or if there are any other changes that you'd suggest. Thanks.
@discordianfish want to take another look?
@SuperQ any chance this could get a review?