sysinfo icon indicating copy to clipboard operation
sysinfo copied to clipboard

Memory info should be more detail ?

Open Haraguroicha opened this issue 7 years ago • 3 comments

Following this below of code block, there only accept/get first BANK information into memory structure (each DMI type 17 record is describe for a single BANK), but there may be use different type of memory model on server memory (e.g. different of clock speed or Bank Locator), there are not always used same memory information

Is there can add a detailed information into Memory structure or add as Memory.Details ?

e.g.:

{
  "memory": {
    "detailed": [
      {
        "bank": 0,
        "size": 8192,
        "speed": 2133,
        "type": "LPDDR3",
        "voltage": 1.2
      }, {
        "bank": 2,
        "size": 4096,
        "speed": 1866,
        "type": "LPDDR3",
        "voltage": 1.2
      }, {
        "bank": 3,
        "size": 4096,
        "speed": 1866,
        "type": "LPDDR3",
        "voltage": 1.2
      }
    ],
    "total_size": 16384
  }
}

https://github.com/zcalusic/sysinfo/blob/9dc8824c92929e7980bbb316345da86f8b1ada58/memory.go#L192-L210

Haraguroicha avatar Mar 15 '19 06:03 Haraguroicha

Hello @Haraguroicha,

I wasn't even aware that you could have memory banks with different parameters like type, speed, frequency etc... At least, I haven't seen it in the wild, so far.

I do care a lot about simplicity of this library, and compatibility with previous versions. But... I would accept a PR on the topic. I'd also like to hear what other users of the library think?

If you expect me to code it, I must admit it could take a while... quite busy with other stuff...

zcalusic avatar Mar 22 '19 16:03 zcalusic

yes, I also hope the memory info could be more detail.

chendh521 avatar Mar 29 '19 02:03 chendh521

I pushed a PR as #14

Haraguroicha avatar Apr 30 '19 10:04 Haraguroicha