Originally posted by: bassemir
You can have physical CPUs, logical CPUs and virtual CPUs. I'll take a stab at explaining the difference.
Physical CPU - this is how many physical processors are in a machine. Most folks also call the physical CPU a "core".
With AIX one can use simultaneous multi threading (SMT) which will make each physical CPU look like two CPUs to the operating system. These are logical CPUs. So you could have a 4-way system and when you run nmon see 8 processors (with SMT enabled).
With AIX micro-partitioning you can divide a single physical processor up into as many as 10 virtual processors. A virtual processor can be entitled to use as little as 0.1 of a physical CPU. So with a system that has 4 physical processors can be divided up into as many as 40 virtual CPUs. To the operating system these virtual processors look like a single CPU. If SMT is enabled the operating system sees two logical processors for each "virtual processor".
commands like lsdev |grep proc will show the number or CPUs the OS thinks it has
the lparstat command will show the number of logical CPUs (in the first line lcpu=4)
So I guess to answer your question one needs to know what kind of CPU you are trying to count.
Hope that was not too confusing....
Rich