OCSInventory-NG / OCSInventory-ocsreports

Webconsole for OCS Inventory NG
https://www.ocsinventory-ng.org
GNU General Public License v2.0
230 stars 150 forks source link

[FEATURE] Columns for sockets, cores and cpus #1293

Open pchamo opened 2 years ago

pchamo commented 2 years ago

Ocsreports doesn't include a column for number of cores, so it's imposible to generate a report of cpus, sockets and cores. Rvtools shows 3 columns for virtual machines: cpus, sockets and cores. The number of sockets multiplied by the number of sockets gives the number of cpus, right?. I can tell that the Computer: procesorn is not the number of cpus but the number of sockets, isn't it?

Please add a column to visualize the number of cores, and other one for the number of cpus and sockets. And please, check the names of the columns in order to be sure that the columns names are right. Could you please clarify about that?

I can tell that the number of cores can be calculated like this:

SELECT HARDWARE_ID, SUM(CORES) FROM cpus where CORES > 0 GROUP BY HARDWARE_ID ORDER BY SUM(CORES) DESC

I used where CORES > 0 because some inventories have CORES=0 (is it a bug?)

Thank you very much.

CyberAbwehr commented 2 years ago

Hi pchamo,

I think the information it is still available.

Example:

HARDWARE:

Manufacturer Type Serial number Frequency Cores number L2 cache size Architecture Data width Current address width Logical CPUS Voltage Current speed Socket type
GenuineIntel Intel(R) Xeon(R) CPU E5-2670 v3 @ 2.30GHz CPU Enabled 2297 12 3072 x86_64 64 64 24   2297 Proc 1
GenuineIntel Intel(R) Xeon(R) CPU E5-2670 v3 @ 2.30GHz CPU Enabled 2297 12 3072 x86_64 64 64 24   2297 Proc 2

VMWARE:

Manufacturer Type Serial number Frequency Cores number L2 cache size Architecture Data width Current address width Logical CPUS Voltage Current speed Socket type
GenuineIntel Intel(R) Xeon(R) Gold 6238 CPU @ 2.10GHz CPU Enabled 2095 8 0 x86_64 64 64 8 3.3 volts 2095 CPU #000

Microsoft Hyper-V:

Manufacturer Type Serial number Frequency Cores number L2 cache size Architecture Data width Current address width Logical CPUS Voltage Current speed Socket type
GenuineIntel Intel(R) Xeon(R) CPU E5-2670 v3 @ 2.30GHz CPU Enabled 2297 6 0 x86_64 64 64 6   2297 None

best regards

pchamo commented 2 years ago

Hi @CyberAbwehr, in the all computers page only the cpu number value is available: image

I needed to create a report including number of sockets and number of cores. I would be nice to have the option to add sockets, cores and cpus values to reports.

CyberAbwehr commented 2 years ago

Hi pchamo,

Build a search with Processor(s) with all your criteria's and download the search result (CSV).

Bildschirmfoto 2021-11-24 um 20 16 43

Bildschirmfoto 2021-11-24 um 20 17 56

best regards

pchamo commented 2 years ago

Hi @CyberAbwehr, thank you very much, I'm going to give you a feedback, but first look al this, this is how rvtools report the cpus, cores and sockets numbers: image

pchamo commented 2 years ago

And this is how ocs reports: image

pchamo commented 2 years ago

So, as you can see, the number of cpus is misleading. It's wrong. It's a bug, isn't it?

pchamo commented 2 years ago

Ocs is not showing the number of cpus but the number of sockets! Am I wrong?

CyberAbwehr commented 2 years ago

Hi try it with socket types.

best regards

pchamo commented 2 years ago

These values are from HP-32:

image

pchamo commented 2 years ago

Here you are, please compare these values with the values of rvtools: image

pchamo commented 2 years ago

How many cpus/sockets and cores does HP32 really have? According to rvtools: 3 sockets, 2 cores what gives 6 cpus, according to ocs: 2 cores and 3 cpus and 2 logical cpus? It doesn't match!

CyberAbwehr commented 2 years ago

What is the real HW configuration? Bios?

pchamo commented 2 years ago

The VM hp32 was created like this: image

pchamo commented 2 years ago

This is not a VM, it's my computer: image

And in ocs appears like this: image

pchamo commented 2 years ago

So processorn number is equivalent to sockets number. My point is that it's important to have the option to show number of cores/logical cpus/sockets in the main page (in the all computers page).

pchamo commented 2 years ago

But for vsphere vmware VM the numbers doesn't match: image The number of logical cpus should be 6, shouldn't it?

pchamo commented 2 years ago

The number of cpus always will correspond to logical cpus for virtual machines. And in vmware what I know is that it's the same to assign 3 sockets with 2 cores, or to assign 6 sockets with 1 core, or 1 socket with 6 cores, or 2 sockets with 3 cores. I would like that ocs shows that number of logical cpus "well calculated" preferably in all computers page because it's not the same to have all the data available to query from the all computers page in comparisson to have to do a multisearch query. Thanks.

CyberAbwehr commented 2 years ago

Socket Type = Physical CPU Cores Number = physical Cores Logical CPUS = hyperthreading

best regards