Gee! I'm at a lost for this kind of purpose. But based on my common sense, you should use the HW specification of the machine for the number of socket and CPU cores per socket. What you allocate to your LPAR may be a subset of the entire set of available cores and sockets but this entire set of CPU HW still consumes electrical energy.
Original Message:
Sent: Mon June 19, 2023 02:03 AM
From: Sarfaraj Pirjade
Subject: Number of CPU and Number of Cores on LPAR
Thank you Satid for your advise.
Basically, we are exploring ways to calculate CO2 emission for a IBMi LPAR. In that context we discussed with some non-IBMi machine owners. There, we come to know from Linux team, that they get number of CPU and number of Cores for Linux. Based on that they have some formulas to derive CO2 emission.
In this context, on IBMi side we are trying to get his information as initial study on this subject.
Do you have any idea on this ?
Thank you in advance
------------------------------
Sarfaraj Pirjade
Original Message:
Sent: Wed June 14, 2023 08:48 PM
From: Satid Singkorapoom
Subject: Number of CPU and Number of Cores on LPAR
Sarfaraj
Judging from you last question, I see that you need to read and try to understand the concept of IBM Power Systems' Virtualization Technology in the part of processing power first. It may be better if you tell us why you want the information you asked and we may tell you what you really need to obtain.
------------------------------
Education is not the learning of facts but the training of the mind to think. -- Albert Einstein.
------------------------------
Satid S.
Original Message:
Sent: Wed June 14, 2023 08:40 PM
From: Sarfaraj Pirjade
Subject: Number of CPU and Number of Cores on LPAR
Thank you for your response
Could be a basic question. Why we have physical processor and virtual processor. In your example, do we say we have total 1.2 CPU allocated for the LPAR. And do we have number of cores? How can we get number of cores?
------------------------------
Sarfaraj Pirjade
Original Message:
Sent: Wed June 14, 2023 09:03 AM
From: Robert Berendt
Subject: Number of CPU and Number of Cores on LPAR
I retrieved this information from my HMC:

Let's look at the second system listed. It has 0.2 Allocated processors and 1 Allocated virtual processors(VP). You can tie that to:
select configured_cpus, current_cpu_capacity
from qsys2.system_status_info;

This is a small test lpar and only uses 0.2 of a core.
------------------------------
Robert Berendt IBMChampion
Original Message:
Sent: Wed June 14, 2023 08:22 AM
From: Sarfaraj Pirjade
Subject: Number of CPU and Number of Cores on LPAR
Hello,
I need to know number of CPUs and number of Cores on a IBMi LPAR. Does anyone have any idea how can i get it.
I found a SQL view which gives configured CPUs but no information on number of Cores.
SELECT CONFIGURED_CPUS FROM QSYS2.SYSTEM_STATUS_INFO;
Link: https://www.ibm.com/docs/en/i/7.4?topic=services-system-status-info-view
Any idea if I am right on getting number of CPUs usign above SQL ?
Any way (SQL or system tables/functions) by which i can get number of Cores ?
Thank you
------------------------------
Sarfaraj Pirjade
------------------------------