jaypipes / ghw

Go HardWare discovery/inspection library
Apache License 2.0
1.63k stars 177 forks source link

snapshot: collect data related to GPU devices #243

Closed ffromani closed 3 years ago

ffromani commented 3 years ago

make sure the snapshot code collects data related to GPU devices. Turns out not much was missing, most notably the /sys/class/drm link; nevertheless, let's make sure to collect this data, so now also the gpu package can consume snapshots.

We choose to refactor the code from net devices collection more for clarity -what we collect and what we filter out is a bit more explicit now- than to avoid duplication.

The PCI collection code is a bit more elaborate, because it needs to deal with PCI roots and subtrees (subforests?), so it was intentionally left out for the time being.

Signed-off-by: Francesco Romani fromani@redhat.com

ffromani commented 3 years ago

split from https://github.com/jaypipes/ghw/pull/235