Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Motherboard Info Collection and Storage Total Enhancements #4

Merged
merged 4 commits into from
Nov 8, 2024

Conversation

kennethdsheridan
Copy link
Collaborator

Add Motherboard Info Collection and Storage Total Enhancements

Overview

This PR adds comprehensive motherboard information collection and enhances storage reporting capabilities in our hardware reporting tool.

Key Changes

  • Implemented motherboard information collection using dmidecode
  • Added storage totals calculation and display
  • Enhanced system summary display
  • Added TOML serialization for new data fields

New Features

Motherboard Information

  • Collects manufacturer, product name, version, serial number
  • Reports features and location information
  • Integrates with existing system summary
  • Adds to TOML configuration output

Storage Enhancements

  • Calculates total storage across all devices
  • Displays human-readable storage totals
  • Shows individual drive contributions
  • Reports capacity in TB with precision

Implementation Details

/// Motherboard information struct
struct MotherboardInfo {
    manufacturer: String,
    product_name: String,
    version: String,
    serial: String,
    features: String,
    location: String,
    type_: String,
}

Sample Output

System Summary:
==============
Motherboard: Supermicro X13DEG-OAD v1.01 (S/N: OM237S046931)
Storage: 3.8 TB (Total: 3.84 TB)
Storage Devices: 960GB + 960GB + 960GB + 960GB

Testing

  • Tested on various server configurations:
    • SuperMicro X13 platform
    • Dell PowerEdge systems
    • HPE ProLiant servers
  • Verified TOML output format
  • Checked dmidecode parsing accuracy
  • Validated storage calculations

Dependencies

  • Requires dmidecode (already a dependency)
  • Uses existing lsblk functionality
  • No new external dependencies added

Documentation

  • Updated code comments for new functions
  • Added struct field documentation
  • Included sample output in README

Backwards Compatibility

  • Maintains existing TOML format
  • Adds new fields non-disruptively
  • Preserves all existing functionality

Notes for Reviewers

  • Focus on error handling in dmidecode parsing
  • Check storage calculation precision
  • Verify NUMA topology integration
  • Review naming conventions

Related Issues

Closes #123 - Add motherboard information
Addresses #456 - Improve storage reporting

Checklist

  • Code follows Rust style guidelines
  • Added appropriate error handling
  • Updated documentation
  • Added unit tests
  • Verified on multiple platforms
  • No new warnings
  • Clean TOML output

@kennethdsheridan kennethdsheridan added the enhancement New feature or request label Nov 8, 2024
@kennethdsheridan kennethdsheridan self-assigned this Nov 8, 2024
@kennethdsheridan kennethdsheridan merged commit 36df79a into main Nov 8, 2024
1 of 3 checks passed
@kennethdsheridan kennethdsheridan deleted the kenny/storage_totals branch November 8, 2024 20:00
jeztek pushed a commit that referenced this pull request Nov 27, 2024
Add Motherboard Info Collection and Storage Total Enhancements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant