AIX

 View Only
Expand all | Collapse all

How to get Physical processor count on AIX

  • 1.  How to get Physical processor count on AIX

    Posted Fri February 27, 2009 08:35 AM

    Originally posted by: Chanthu


    Hello,

    I would like to know is there any command or api which will retrieve the following CPU information on AIX.

    1. Exact number of Physical cpu
    2. Exact number of logical cpu (cores)
    3. Exact number of Threads (if SMT enabled)

    Thanks in advance,
    Chanthu


  • 2.  Re: How to get Physical processor count on AIX

    Posted Fri February 27, 2009 09:54 AM

    Originally posted by: Emittim3@Sirius


    lparstat should give you all of that.


  • 3.  Re: How to get Physical processor count on AIX

    Posted Sun March 01, 2009 07:43 AM

    Originally posted by: Chanthu


    Hi,

    Thanks for Your replay.

    Following is the output of 'lparstat' on my machine. Could you please help me to find out the exact number of Physical processor count from this information.

    % lparstat

    System configuration: type=Shared mode=Uncapped smt=On lcpu=8 mem=8192 psize=4 ent=0.40

    %user %sys %wait %idle physc %entc lbusy app vcsw phint

    ----

    -----
    • --- ----
    7.4 11.7 0.1 80.7 0.09 22.7 1.9 3.83 4569463145 52619140
    Thanks in advance
    Chanthu


  • 4.  Re: How to get Physical processor count on AIX

    Posted Sun March 01, 2009 10:04 AM

    Originally posted by: The_Doctor


    You need to have a look at the man pages for lparstat. "lparstat -i" is probably what you are after.


  • 5.  Re: How to get Physical processor count on AIX

    Posted Sun March 01, 2009 11:05 PM

    Originally posted by: Chanthu


    Hi,

    I could not find any way to retrieve "Actaual physical cpu count(Not cores)" from lparstat.
    is there any way to find out exact installed physical cpu count on AIX ?

    Thanks and regards,
    Chanthu.


  • 6.  Re: How to get Physical processor count on AIX

    Posted Sun March 01, 2009 11:52 PM

    Originally posted by: drajarsh


    See the output of the prtconf command.

    #prtconf
    ...
    .....
    .......
    Processor Type: PowerPC_POWER5
    Number Of Processors: 3
    Processor Clock Speed: 1654 MHz
    CPU Type: 64-bit
    .....
    ...
    ..

    The 'number of processors' gives you the actual number of physical CPUs installed and active.

    Combine this information with the output of lparstat -i:

    #lparstat -i
    ..
    ...
    Maximum Physical CPUs in system : 16
    Active Physical CPUs in system : 12
    ...
    ..

    You have 12 cores active and 3 CPUs, so each CPU has 4 cores.


  • 7.  Re: How to get Physical processor count on AIX

    Posted Mon March 02, 2009 12:38 AM

    Originally posted by: Chanthu


    Hi,

    #prtconf

    System Model: IBM,9110-51A
    Machine Serial Number: 0666B0F
    Processor Type: PowerPC_POWER5
    Number Of Processors: 4
    Processor Clock Speed: 1648 MHz

    #lparstat -i
    ..
    ...
    Maximum Physical CPUs in system : 4
    Active Physical CPUs in system : 4

    In my machine its having only one physical processor and 4 cores. But prtconf showing 4 physical cpus. is this right? . I am using AIX 5.3 .
    Thanks and regards,
    Chanthu.


  • 8.  Re: How to get Physical processor count on AIX

    Posted Mon March 02, 2009 06:32 AM

    Originally posted by: Chanthu


    Hi,

    1. lsdev -Cc processor
    proc0 Available 00-00 Processor
    proc2 Available 00-02 Processor
    proc4 Available 00-04 Processor
    proc6 Available 00-06 Processor
    From "00-02", is '00' indicates physical processor id and '02' indicates the core id ?


  • 9.  Re: How to get Physical processor count on AIX

    Posted Mon March 02, 2009 07:35 AM

    Originally posted by: nh4aix


    Hello Chantu -

    Let's take a step back... Why do you want to know "Actaual physical cpu count(Not cores)"? Also, I will not use the term "cpu" in the post again, because the meaning of the term is too vague: different manufacturers use it in different ways so its meaning is diluted.

    I think a little background will help this discussion. Since Power4 (approx 2000) IBM AIX Servers are "dual-cored" (with one exception: Quad-core which I will discuss in a minute). On a single processor chip, there are two cores. Each core is completely independent of the other. This applies to Power4, Power5 & Power6. The vast majority of software packages license to the core level; not the chip level. IBM, its partners, all of the various benchmarks (TPC, SPEC, etc) quote "core count", not chip count. Other manufacturers (Intel, Sun, etc.) will discuss sockets or other terms and it is confusing. The users has the unlikely job of reconciling the different terms.

    Exception: for some of the Power5+ servers, IBM offered a Quad Core. This was 4 cores on a single chip. It was offered on the low end servers only (at least 520Q, 550Q and 560Q; maybe others). The software market recognized it as lower performing cores and discounted their software licenses (for example IBM's Software group PVU gave the Quad Core 50 units per core compared to the 100 units per core on the Dual Core chip implementations).

    That is probably more "core" education than you wanted. Brings us back to your question: "Actual CPU count, not cores"? So I will assume you want to know how many "chips" are installed? Again I ask why? The software vendors charge on cores. The published benchmarks count cores. I am very curious as to why?

    Regardless of my curiousity, AIX has no awareness of "chips"; it counts cores. All of the other responders have given you excellent AIX methods to count and display the number of cores. There is no notion of "CPU ID", or location. It just counts cores and give each one a different "soft" location number.

    To determine the number of chips (assuming you aren't running a Power5+ Quad Core model), count the number of cores and divide by two. If you are running a Quad Model, divide by 4. And to answer your next question, I do not know a programmatic way to determine if you are running a Quad Model.

    Hope that helps.
    Joe


  • 10.  Re: How to get Physical processor count on AIX

    Posted Mon March 02, 2009 09:55 AM

    Originally posted by: drajarsh


    It certainly makes sense when we look at the output of the two different commands:

    1) prtconf
    2) lsdev -Cc processor

    and understand the output as relating to cores and not the entire chip itself.

    1. lsdev -Cc processor
    proc0 Available 00-00 Processor
    proc2 Available 00-02 Processor
    proc4 Available 00-04 Processor
    proc6 Available 00-06 Processor

    Taking the above example, all the four above are cores from a single cpu that you can use.

    #prtconf

    System Model: IBM,9110-51A
    Machine Serial Number: 0666B0F
    Processor Type: PowerPC_POWER5
    Number Of Processors: 4
    Processor Clock Speed: 1648 MHz

    The 'Number of Processors' : 4 is really the number of cores that you can use. The term 'processor' is misleading.

    #lparstat -i
    ..
    ...
    Maximum Physical CPUs in system : 4
    Active Physical CPUs in system : 4

    lparstat -i is also telling you the total number of cores that are possible in the system (Maximum physical CPUs) since you have a single quad core chip, and
    also the number of cores that are active (available for use): which is again 4.

    Even here, the term 'physical CPU' is misleading.

    However, note that lparstat -i gives you the total number of cores (max phy CPUs/ active phy CPUs) on the entire managed system (and not just on your LPAR), which explains the observation on my managed system:

    #lparstat -i
    Maximum Physical CPUs in system : 16
    Active Physical CPUs in system : 12

    #prtconf
    Number Of Processors: 3 // my LPAR uses three cores.

    #lsdev -Cc processor // my LPAR uses three cores.
    proc0 Available 00-00 Processor
    proc2 Available 00-02 Processor
    proc4 Available 00-04 Processor

    Regd the numbering, not sure what the tags 00-00 mean but all we can say for sure is that our lpar uses three cores from the total available 12 cores on the managed system.


  • 11.  Re: How to get Physical processor count on AIX

    Posted Tue March 03, 2009 12:46 AM

    Originally posted by: Chanthu


    Thanks for all your detailed informations regarding AIX core/socket details.

    Is it possible to get a list of all AIX Quad core supporting models ?

    Thanks and regards,
    Chanthu.


  • 12.  Re: How to get Physical processor count on AIX

    Posted Tue March 03, 2009 06:54 AM

    Originally posted by: nh4aix


    Hi -

    the Quad core models are the Q models:

    560Q (9116-561); 550Q (9133-55A); 520Q (9131-52A); 510Q (9110-51A); 505Q (9115-505).

    So why the interest in determining how many CPU's on AIX?

    joe


  • 13.  Re: How to get Physical processor count on AIX

    Posted Tue March 03, 2009 07:31 AM
      |   view attached

    Originally posted by: Chanthu


    Hello,

    --> So why the interest in determining how many CPU's on AIX?

    I am doing a licencing project which based on both physical processor count and logical processor count.

    My machine the uname -a output showing
    #uname -a
    AIX attila 3 5 00CFCD9D4C00

    From 00CFCD9D*4C*00, this id what I understood is the model is PowerPC 603/604. I am using attached program for identifying model.
    Is this a Quad core supporting model ?

    Attachment(s)



  • 14.  Re: How to get Physical processor count on AIX

    Posted Tue March 03, 2009 05:03 PM

    Originally posted by: nh4aix


    Chantu -

    Is this a Quad core supporting model ?

    I don't know.

    I would warn against using the uname command to determine your model. I prefer "lsattr -El sys0 | grep modelname".

    Reference: http://publib.boulder.ibm.com/infocenter/systems/scope/aix/topic/com.ibm.aix.cmds/doc/aixcmds3/lsattr.htm?resultof=%22%6c%73%61%74%74%72%22%20&searchQuery=%6c%73%61%74%74%72&searchRank=%30&pageDepth=%30

    If you look at the Info Center for the uname command it says: "Also note that not all machine types have a machine ID. Many new machines share a common machine ID of 4C"

    Reference: http://publib.boulder.ibm.com/infocenter/systems/scope/aix/topic/com.ibm.aix.cmds/doc/aixcmds5/uname.htm?resultof=%22%75%6e%61%6d%65%22%20&searchQuery=%75%6e%61%6d%65&searchRank=%31&pageDepth=%30

    Hope that helps...

    joe


  • 15.  Re: How to get Physical processor count on AIX

    Posted Tue March 03, 2009 11:59 PM

    Originally posted by: Chanthu


    Hi,

    --> the Quad core models are the Q models:

    • > 560Q (9116-561); 550Q (9133-55A); 520Q (9131-52A); 510Q (9110-51A); 505Q (9115-505).
    % lsdev -Cc processor | grep Available
    proc0 Available 00-00 Processor
    proc2 Available 00-02 Processor
    % % lsattr -El sys0 | grep modelname | awk '{print $2}'
    IBM,9115-505
    From the above output its a 505Q (9115-505) machine, but its having only two processors, that means its a dual core.

    am I right ?


  • 16.  Re: How to get Physical processor count on AIX

    Posted Wed March 04, 2009 08:44 AM

    Originally posted by: nh4aix


    Hi there...

    yes, you have a dual core implementation.

    The 505 has both dual core and quad core implementations.

    Thanks,
    Joe


  • 17.  Re: How to get Physical processor count on AIX

    Posted Tue March 10, 2009 10:12 AM

    Originally posted by: KelleyCook


    Chanthu,

    This licensing project of your is destined for failure if you don't understand how Power systems actually work.

    Essentially, Once you get into Virtualization, which all the higher end systems use, Physical Cores don't matter at all, and its all about what each partition is entitled to.

    So unless you are running Dedicated mode, these calculations your attempting simply won't work

    Furthermore, using that lsdev information that someone suggested is just wrong.

    For example, here is the actual output from one of my LPARs:

    $ lsdev -C | grep proc
    proc0 Available 00-00 Processor
    proc2 Available 00-02 Processor
    proc4 Available 00-04 Processor
    proc6 Available 00-06 Processor
    proc8 Available 00-08 Processor
    proc10 Available 00-10 Processor
    proc12 Available 00-12 Processor
    proc14 Available 00-14 Processor
    proc16 Available 00-16 Processor
    proc18 Available 00-18 Processor
    proc20 Available 00-20 Processor
    proc22 Available 00-22 Processor
    proc24 Available 00-24 Processor
    proc26 Available 00-26 Processor
    proc28 Available 00-28 Processor
    proc30 Available 00-30 Processor
    proc32 Available 00-32 Processor
    proc34 Available 00-34 Processor
    proc36 Available 00-36 Processor
    proc38 Available 00-38 Processor
    proc40 Available 00-40 Processor
    proc42 Available 00-42 Processor
    proc44 Available 00-44 Processor
    proc46 Available 00-46 Processor
    proc48 Available 00-48 Processor
    proc50 Available 00-50 Processor
    proc52 Available 00-52 Processor
    proc54 Available 00-54 Processor
    proc56 Available 00-56 Processor
    proc58 Available 00-58 Processor
    proc60 Available 00-60 Processor
    proc62 Available 00-62 Processor
    proc64 Available 00-64 Processor
    proc66 Available 00-66 Processor
    proc68 Available 00-68 Processor
    proc70 Available 00-70 Processor
    proc72 Available 00-72 Processor
    proc74 Available 00-74 Processor
    proc76 Available 00-76 Processor
    proc78 Available 00-78 Processor
    proc80 Available 00-80 Processor
    proc82 Available 00-82 Processor
    proc84 Available 00-84 Processor
    proc86 Available 00-86 Processor
    proc88 Available 00-88 Processor
    proc90 Available 00-90 Processor
    proc92 Available 00-92 Processor
    proc94 Available 00-94 Processor
    proc96 Available 00-96 Processor
    proc98 Available 00-98 Processor
    proc100 Available 00-100 Processor
    proc102 Available 00-102 Processor
    proc104 Available 00-104 Processor
    proc106 Available 00-106 Processor
    proc108 Available 00-108 Processor
    proc110 Available 00-110 Processor

    But the system is actually entitled to 27.0 cpus

    $ lparstat -i
    Node Name : XXXXXXX
    Partition Name : XXXXXX
    Partition Number : 5
    Type : Shared-SMT
    Mode : Uncapped
    Entitled Capacity : 27.00
    Partition Group-ID : 32773
    Shared Pool ID : 0
    Online Virtual CPUs : 56
    Maximum Virtual CPUs : 64
    Minimum Virtual CPUs : 1
    Online Memory : 81920 MB
    Maximum Memory : 98304 MB
    Minimum Memory : 16384 MB
    Variable Capacity Weight : 128
    Minimum Capacity : 0.10
    Maximum Capacity : 28.00
    Capacity Increment : 0.01
    Maximum Physical CPUs in system : 64
    Active Physical CPUs in system : 57
    Active CPUs in Pool : 57
    Unallocated Capacity : 0.00
    Physical CPU Percentage : 48.21%
    Unallocated Weight : 0


  • 18.  Re: How to get Physical processor count on AIX

    Posted Mon November 21, 2011 06:31 PM

    Originally posted by: chcfrank


    Chanthu,

    Did you get your answer and able to do all these license related calculation?
    I am now in the same boat and I am seeing some additional variation also.
    Can you share what you have so far?
    Thanks!

    BTW, For some machine, this output seem to provide additional information to help address the question:
    So, the first command seems to tell you proc0 & proc1 is on P1-C1(socket 1 core 1?). However, lparstat indicates it is no smt enabled and total logical cpu(4) is equal to number of core(4). The lscfg output indicates that the system support 2-way processor that it should mean dual-core processor.
    However, not all systems have prtconf kind of output and we now have machine having '8-Way PROC' from lscfg

    -Frank
    $ prtconf |grep -i processor
    Processor Type: PowerPC_POWER4
    Processor Implementation Mode: POWER 4
    Processor Version: PV_4_2
    Number Of Processors: 4
    Processor Clock Speed: 1452 MHz
    0516-010 : Volume group must be varied on; use varyonvg command.
    Model Implementation: Multiple Processor, PCI bus
    + proc0 U0.1-P1-C1 Processor
    + proc1 U0.1-P1-C1 Processor
    + proc2 U0.1-P1-C2 Processor
    + proc3 U0.1-P1-C2 Processor
    $ lscfg -vp|grep 'W.*PROC'
    2W PROC :
    2W PROC :
    4W PROC BP EXPAN:
    $ lparstat

    System configuration: type=Dedicated mode=Capped smt=Off lcpu=4 mem=8192MB

    %user %sys %wait %idle

    -----
    ------
    9.1 21.7 17.4 51.9
    $


  • 19.  Re: How to get Physical processor count on AIX

    Posted Tue March 10, 2009 01:06 PM

    Originally posted by: SystemAdmin


    You need to clear up your vocabulary.
    logical CPUs are not cores.
    Since I see that "SMT" is on, that logical count will be twice the number of processors the LPAR sees.
    "type=Shared" tells me the four processors the LPAR sees are virtual not physical.
    Those virtual processors are how many CPUs the LPAR thinks it has.
    Those virtual processors are nothing more than a software mechanism through which the "entitled capacity" of 0.40 processing units are delivered.
    So, for each 10 ms. of elapsed time, this LPAR will receive the "equivalent" of two fifths of a physical processor's processing power.
    • 0.10 processing units delivered through each of the four virtual processors
    • allowing eight threads of execution.

    Hope that helps.


  • 20.  Re: How to get Physical processor count on AIX

    Posted Thu May 12, 2016 07:14 AM

    Originally posted by: Santosgusta


    Hi, beside all the commands posted here, you have also the smtctl command which is used to control smt behavior and also to display  logical to physical information. Check the man page. Regards.