glpi-project / glpi-agent

GLPI Agent
GNU General Public License v2.0
251 stars 61 forks source link

Incorrect memory detection in a dual processor system #750

Closed Adler-lug closed 2 months ago

Adler-lug commented 2 months ago

Bug reporting acknowledgment

Yes, I read it

Professional support

Yes, I know

Describe the bug

There are several servers with two processors and during inventory the number of modules and memory capacity are determined only for one of the processors.

To reproduce

Run inventory on a dual-processor system

Expected behavior

See the full amount of memory and the number of modules

Operating system

Linux

GLPI Agent version

v1.10, v1.8

GLPI version

10.0.x (See additional context below)

GLPIInventory plugin or other plugin version

GLPI Inventory v1.3.x (See additional context below)

Additional context

No response

g-bougard commented 2 months ago

Hi @Adler-lug

can you share for at least one such computer the following command outputs run from a root console or with sudo ?

glpi-inventory --partial cpu,memory

&

dmidecode
Adler-lug commented 2 months ago

This is very interesting, because both dmidecode and lshw see only 4 modules out of 8, while lshw displays the total memory size correctly

g-bougard commented 2 months ago

Hi @Adler-lug

will you share the datas I requested so I can investigate ?

Adler-lug commented 2 months ago

dmidecode.txt glpi_cpu_memory.json lshw.txt

g-bougard commented 2 months ago

So you mean this computer has indeed 128Gb as reported as total size in lshw output.

But dmidecode only reports 4 modules. And even it reports 2 "Physical memory area", but the second with no device at the end of the output:

Handle 0x0037, DMI type 16, 35 bytes
Physical Memory Array
    Location: System Board Or Motherboard
    Use: System Memory
    Error Correction Type: Multi-bit ECC
    Maximum Capacity: 96 GB
    Error Information Handle: Not Provided
    Number Of Devices: 0

This looks better like a bios or dmidecode issue. If this is eventually a bios issue, can you check if you don't have a BIOS update that can fix that problem ? If this is a dmidecode issue, you may look for a dmidecode update in your distro. You can eventually try to build dmidecode from sources to see if latest version still fixes it: https://github.com/mirror/dmidecode It's really easy to build as you essentially need to install gcc, extract the source in a folder and run make command from that folder.

Just to show how linux see available memory, can you share the output of free command ?

g-bougard commented 2 months ago

Hi @Adler-lug

I'm closing your issue without any feedback to my questions.

Feel free to comment or even reopen if you have some answers.