Skip to content

Refactor of the dimm collector - #288

Open
graepaul wants to merge 5 commits into
developmentfrom
refactor/dimm_collector
Open

graepaul wants to merge 5 commits into
developmentfrom
refactor/dimm_collector

Conversation

@graepaul

@graepaul graepaul commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Improve full memory dmidecode for linux.
  • Adding a full decode of wmic for windows.
  • Improved unit-tests

Here is what a dimm looks like

{
  "dimms": [
    {
      "size_bytes": 103079215104,
      "locator": "CPU0_A",
      "bank_locator": "_Node0_Channel0_Dimm0",
      "manufacturer": "Samsung",
      "part_number": "M321RYGA0PB0-CWMXJ",
      "serial_number": "1234-567889AB",
      "memory_type": "DDR5",
      "form_factor": "DIMM",
      "speed_mts": 5600,
      "configured_speed_mts": 5600,
      "rank": 2,
      "data_width_bits": 64,
      "total_width_bits": 80,
      "size": "96GB"
    },
...

Test plan

  • pytest test/unit - Improved unit-tests which now runs against a large fixtures file validating functionality.
  • pytest test/functional (if applicable) - N/A
  • pre-commit run --all-files

Checklist

  • Added/updated tests (or explained why not)
  • Updated docs/README if behavior changed
  • No secrets or credentials committed

@graepaul graepaul changed the title Fix some typing warnings Refactor of the dimm collector Sep 17, 2026
from nodescraper.models import DataModel

# Byte multiplier for every size unit that dmidecode may report for a module.
SIZE_UNITS = {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and other code about bits/bytes will get moved to utils.

@amd-ansonyim amd-ansonyim left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, just one thing


return self._parse_wmic_csv(res.stdout)

def _log_cmd_error(self, res: CommandArtifact) -> None:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

res is called but not used. Do we need to add that to the log_event? Right now I think end user will just see "Error checking dimms" with no further context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants