procfs icon indicating copy to clipboard operation
procfs copied to clipboard

Add support for several /sys/class/sas_* classes

Open scottlaird opened this issue 2 years ago • 4 comments

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.

scottlaird avatar Jun 05 '22 00:06 scottlaird

Some minor comments but LGTM in general. Thanks!

discordianfish avatar Jun 07 '22 10:06 discordianfish

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.

scottlaird avatar Jun 08 '22 04:06 scottlaird

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.

scottlaird avatar Jun 08 '22 05:06 scottlaird

@discordianfish want to take another look?

scottlaird avatar Jun 13 '22 15:06 scottlaird

@SuperQ any chance this could get a review?

scottlaird avatar Sep 26 '22 16:09 scottlaird