Toward that end, I put together this reference for anyone that needs this kind of information.
Note that their are typically multiple methods by which to determine the number of CPUs. Further, some commands show just the number of physical CPUs while others list the the number of threads, or cores, or Hyper-Threads. With that said, here are the methods per operating system.
Solaris
The following command will give you the total number of physical processors in the server.
# psrinfo -p
2
The following command will return the total number of threads/cores in the server.
# psrinfo | wc -l
8
The following command will return detailed information about each physical processor.
# psrinfo -pv
2
The physical processor has 4 virtual processors (0 2 4 6)
x86 (chipid 0x0 GenuineIntel family 6 model 15 step 7 clock 2333 MHz)
Intel(r) Xeon(r) CPU E5345 @ 2.33GHz
The physical processor has 4 virtual processors (1 3 5 7)
x86 (chipid 0x1 GenuineIntel family 6 model 15 step 7 clock 2333 MHz)
Intel(r) Xeon(r) CPU E5345 @ 2.33GHz
Linux
The following command will return the total number of threads/cores in the server.
# grep -c "^processor" /proc/cpuinfo
2
The following command will return detailed information about each physical processor.
# egrep -i "^model name|^core id|^cpu MHz" /proc/cpuinfo
model name : AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
cpu MHz : 1000.000
core id : 0
model name : AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
cpu MHz : 1000.000
core id : 1
HP-UX
The following commands will return the total number of threads/cores in the server.
# mpsched -s | grep "Processor Count"
Processor Count : 4
or
# machinfo | grep "Number of CPUs"
Number of CPUs = 4
or
# /usr/sbin/ioscan -kf | grep processor | wc -l
4
The following command will return detailed information about each physical processor.
# machinfo
CPU info:
Number of CPUs = 4
Clock speed = 1595 MHz
Bus speed = 532 MT/s
CPUID registers
vendor information = "GenuineIntel"
processor serial number = 0x0000000000000000
processor version info = 0x0000000020000704
Reference:
AIX
The following commands will give you the total number of physical processors in the server.
# lsdev -Cc processor |wc –l
or
# prtconf | grep Processor
or
The following command will return the total number of threads/cores in the server.
# bindprocessor -q
The following command will return detailed information about each physical processor.
# prtconf
and
# lsattr -El sys0 -a modelname
and
# lparstat -i|grep ^Active\ Phys
Windows
Use the following sequence of mouse clicks to view the CPU information for the server.
1. Right click the button on the "Start" icon in the lower left hand corner of the screen,
2. click on "Explore".
3. Right click on "My Computer"
4. and click on "Properties".
You will see the type and number of CPUs under the Computer portion of the System Properties window.
Have a great day!
Brad
No comments:
Post a Comment