Skip to content

Commit 3bab3d8

Browse files
authored
Additional memory information collection
Add additional memory information
2 parents 7cf1886 + d83c1a9 commit 3bab3d8

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ pub struct MemoryModule {
189189
pub speed: String,
190190
/// Physical location of the memory module.
191191
pub location: String,
192+
/// Manufacturer of the memory module.
193+
pub manufacturer: String,
194+
/// Serial number of the memory module.
195+
pub serial: String,
192196
}
193197

194198
/// Represents storage information.
@@ -1192,12 +1196,16 @@ impl ServerInfo {
11921196
let type_ = Self::extract_dmidecode_value(text, "Type")?;
11931197
let speed = Self::extract_dmidecode_value(text, "Speed")?;
11941198
let location = Self::extract_dmidecode_value(text, "Locator")?;
1199+
let manufacturer = Self::extract_dmidecode_value(text, "Manufacturer")?;
1200+
let serial = Self::extract_dmidecode_value(text, "Serial Number")?;
11951201

11961202
Ok(MemoryModule {
11971203
size,
11981204
type_,
11991205
speed,
12001206
location,
1207+
manufacturer,
1208+
serial,
12011209
})
12021210
}
12031211

0 commit comments

Comments
 (0)