Cpuinfo



  1. CPU-Z is a freeware that gathers information on some of the main devices of your system: Processor name and number, codename, process, package, cache levels. Mainboard and chipset. Memory type, size, timings, and module specifications (SPD).
  2. Introduction ¶ On x86, flags appearing in /proc/cpuinfo have an X86FEATURE definition in arch/x86/include/asm/cpufeatures.h. If the kernel cares about a feature or KVM want to expose the feature to a KVM guest, it can and should have an X86FEATURE. defined. These flags represent hardware features as well as software features.
  3. CPUinfo is a compact library written in the x86 assembly language completely. It comprises a set of functions to identify various 32-bit and 64-bit x86 processors ranging from those released in 1980's like 386DX to the latest ones of the Intel Core and AMD Phenom microarchitectures.
  1. Cpuinfo Mac
  2. Cpuinfo Ram
  3. Etc Cpuinfo

Last updated on SEPTEMBER 30, 2020

Applies to:

Cpuinfo

CPU is an acronym for the central processing unit. It is an essential part of your desktop or server. The CPU controls the other parts of the computer by sending or reading instructions. Your CPU reads the list of instructions from a computer program. The Ubuntu kernel keeps information about your CPU in the /proc/cpuinfo file. When queried, it provides lots of information about the processor on your Ubuntu Computer. From the preceding output, we can see /proc/cpuinfo file contains lots of information such as vendorid, model name, cache size, the CPU rate in MHZ, and so on.

Solaris Operating System - Version 8.0 and later
Oracle Solaris on x86-64 (64-bit)
Oracle Solaris on SPARC (64-bit)
Cpuinfo siblingsOracle Solaris on SPARC (32-bit)
Oracle Solaris on x86 (32-bit)
***Checked for relevance on 13-May-2014***

Purpose

This document is showing ways to find processor information in Solaris and on Service Processsor

Scope

What's a Solaris CPU?

Cpuinfo Mac

https://blogs.oracle.com/JeffV/entry/what_s_a_solaris_cpu
the phrase 'Solaris CPUs' refer to the view that Solaris has of CPUs.
In the old days, a CPU was a CPU - one chip, one computational entity, one ALU, one FPU, etc.
Now there are many factors to consider - CPU sockets, CPU cores per socket, hardware threads per core, etc.
Solaris 10 and 11 consider 'vCPUs' - virtual processors - as entities on which to schedule processes.
Solaris considers each of these a vCPU:
x86/x64 systems: a CPU core, or in some CPUs, a hardware thread
(today, can be one to eight cores per socket, and one to 16 threads per socket), up to 128 vCPUs in a Sun Fire X4800
UltraSPARC-II, -III[+], -IV[+]: a CPU core, with a maximum of 144 in an E25K
SPARC64-VI: a CPU core, maximum of 64 in a Sun SPARC Enterprise M9000
SPARC64-VII[+]: a hardware thread, maximum of 512 in an M9000
SPARC CMT (SPARC-T1, -T2+, SPARC T3, T4): a hardware thread, maximum of 512 in a SPARC T3-4
Each of these vCPUs can be controlled independently by Solaris.

psrinfo(1M)

System Administration Commands psrinfo(1M)
NAME psrinfo - displays information about processors
SYNOPSIS
psrinfo [-p] [-v] [processor_id...]
psrinfo [-p] -s processor_id
psrinfo -t [-L]
DESCRIPTION
psrinfo displays information about processors. Each physical processor may support multiple virtual processors.
Each virtual processor is an entity with its own interrupt ID, capable of executing independent threads.
% psrinfo -v
Status of virtual processor 0 as of: 03/29/2012 10:07:52
on-line since 09/27/2011 03:17:48.
The sparcv9 processor operates at 1500 MHz,
and has a sparcv9 floating point processor.
Status of virtual processor 1 as of: 03/29/2012 10:07:52
on-line since 09/27/2011 03:17:48.
The sparcv9 processor operates at 1500 MHz,
and has a sparcv9 floating point processor.
-- snip --
// Sun Fire 4800
% psrinfo -pv
The physical processor has 2 virtual processors (0 512)
UltraSPARC-IV+ (portid 0 impl 0x19 ver 0x22 clock 1500 MHz)
The physical processor has 2 virtual processors (1 513)
UltraSPARC-IV+ (portid 1 impl 0x19 ver 0x22 clock 1500 MHz)
-- snip --
The physical processor has 2 virtual processors (18 530)
UltraSPARC-IV+ (portid 18 impl 0x19 ver 0x21 clock 1500 MHz)
The physical processor has 2 virtual processors (19 531)
UltraSPARC-IV+ (portid 19 impl 0x19 ver 0x21 clock 1500 MHz)
// SUNW,Netra-T5440
# psrinfo -vp
The physical processor has 8 cores and 64 virtual processors (0-63)
The core has 8 virtual processors (0-7)
The core has 8 virtual processors (8-15)
The core has 8 virtual processors (16-23)
The core has 8 virtual processors (24-31)
The core has 8 virtual processors (32-39)
The core has 8 virtual processors (40-47)
The core has 8 virtual processors (48-55)
The core has 8 virtual processors (56-63)
UltraSPARC-T2+ (chipid 0, clock 1165 MHz)
The physical processor has 8 cores and 64 virtual processors (64-127)
The core has 8 virtual processors (64-71)
The core has 8 virtual processors (72-79)
The core has 8 virtual processors (80-87)
The core has 8 virtual processors (88-95)
The core has 8 virtual processors (96-103)
The core has 8 virtual processors (104-111)
The core has 8 virtual processors (112-119)
The core has 8 virtual processors (120-127)
UltraSPARC-T2+ (chipid 1, clock 1165 MHz)
// SPARC T4-2
# psrinfo -pv
The physical processor has 64 virtual processors (0-63)
SPARC-T4 (chipid 0, clock 2848 MHz)
The physical processor has 64 virtual processors (64-127)
SPARC-T4 (chipid 1, clock 2848 MHz)
// SPARC T5-2
# psrinfo -pv
The physical processor has 16 cores and 128 virtual processors (0-127)
The core has 8 virtual processors (0-7)
The core has 8 virtual processors (8-15)
The core has 8 virtual processors (16-23)
The core has 8 virtual processors (24-31)
The core has 8 virtual processors (32-39)
The core has 8 virtual processors (40-47)
The core has 8 virtual processors (48-55)
The core has 8 virtual processors (56-63)
The core has 8 virtual processors (64-71)
The core has 8 virtual processors (72-79)
The core has 8 virtual processors (80-87)
The core has 8 virtual processors (88-95)
The core has 8 virtual processors (96-103)
The core has 8 virtual processors (104-111)
The core has 8 virtual processors (112-119)
The core has 8 virtual processors (120-127)
SPARC-T5 (chipid 0, clock 3600 MHz)
The physical processor has 16 cores and 128 virtual processors (128-255)
The core has 8 virtual processors (128-135)
The core has 8 virtual processors (136-143)
The core has 8 virtual processors (144-151)
The core has 8 virtual processors (152-159)
The core has 8 virtual processors (160-167)
The core has 8 virtual processors (168-175)
The core has 8 virtual processors (176-183)
The core has 8 virtual processors (184-191)
The core has 8 virtual processors (192-199)
The core has 8 virtual processors (200-207)
The core has 8 virtual processors (208-215)
The core has 8 virtual processors (216-223)
The core has 8 virtual processors (224-231)
The core has 8 virtual processors (232-239)
The core has 8 virtual processors (240-247)
The core has 8 virtual processors (248-255)
SPARC-T5 (chipid 1, clock 3600 MHz)
// T4-2
# psrinfo -t
socket: 0
core: 0
cpus: 0-7
core: 1
cpus: 8-15
core: 2
cpus: 16-23
core: 3
cpus: 24-31
core: 4
cpus: 32-39
core: 5
cpus: 40-47
core: 6
cpus: 48-55
core: 7
cpus: 56-63
socket: 1
core: 8
cpus: 64-71
core: 9
cpus: 72-79
core: 10
cpus: 80-87
core: 11
cpus: 88-95
core: 12
cpus: 96-103
core: 13
cpus: 104-111
core: 14
cpus: 112-119
core: 15
cpus: 120-127
Gpu

kstat -p cpu_info

% kstat -p cpu_info | less
cpu_info:0:cpu_info0:brand UltraSPARC-IV+
cpu_info:0:cpu_info0:chip_id 0
cpu_info:0:cpu_info0:class misc
cpu_info:0:cpu_info0:clock_MHz 1500
cpu_info:0:cpu_info0:core_id 0
cpu_info:0:cpu_info0:cpu_fru hc:///component=/N0/SB0
cpu_info:0:cpu_info0:cpu_type sparcv9
cpu_info:0:cpu_info0:crtime 555.99622024
cpu_info:0:cpu_info0:current_clock_Hz 1500000000
cpu_info:0:cpu_info0:device_ID 9223374340875157564
cpu_info:0:cpu_info0:fpu_type sparcv9
cpu_info:0:cpu_info0:implementation UltraSPARC-IV+ (portid 0 impl 0x19 ver 0x22 clock 1500 MHz)
cpu_info:0:cpu_info0:pg_id 2
cpu_info:0:cpu_info0:snaptime 15922865.060229
cpu_info:0:cpu_info0:state on-line
cpu_info:0:cpu_info0:state_begin 1317086268
cpu_info:0:cpu_info0:supported_frequencies_Hz 1500000000
cpu_info:1:cpu_info1:brand UltraSPARC-IV+
cpu_info:1:cpu_info1:chip_id 1
cpu_info:1:cpu_info1:class misc
cpu_info:1:cpu_info1:clock_MHz 1500
cpu_info:1:cpu_info1:core_id 1
cpu_info:1:cpu_info1:cpu_fru hc:///component=/N0/SB0
cpu_info:1:cpu_info1:cpu_type sparcv9
cpu_info:1:cpu_info1:crtime 556.910962
cpu_info:1:cpu_info1:current_clock_Hz 1500000000
cpu_info:1:cpu_info1:device_ID 9223374340791271484
cpu_info:1:cpu_info1:fpu_type sparcv9
cpu_info:1:cpu_info1:implementation UltraSPARC-IV+ (portid 1 impl 0x19 ver 0x22 clock 1500 MHz)
cpu_info:1:cpu_info1:pg_id 4
cpu_info:1:cpu_info1:snaptime 15922865.0607254
cpu_info:1:cpu_info1:state on-line
cpu_info:1:cpu_info1:state_begin 1317086268
cpu_info:1:cpu_info1:supported_frequencies_Hz 1500000000
-- snip --

kstat -m cpu_info

Details

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document
Purpose
Scope
What's a Solaris CPU?
psrinfo(1M)
Cpuinfo
kstat -p cpu_info
kstat -m cpu_info
Check with prtdiag(1M)
Check with prtpicl(1M)
Check with ::cpuinfo in mdb
Check status with 'showenvironment' on Service Processor
Check messages / console-output / consolehistory
Check with smbios(1M) (on x86 systems)
Check with 'showhardconf' on OPL systems
On LDom environment check the output of 'ldm list-devices -a'

Cpuinfo Ram

Script 'showcpucount'

Etc Cpuinfo

Details
Master
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.

There’s something really quite subtle about how the nproc utility from GNU coreutils works. If you look at the man page, it’s even the very first sentence:

Print the number of processing units available to the current process, which may be less than the number of online processors.

So, what does that actually mean? Well, just because the computer some code is running on has a certain number of CPUs (and here I mean “number of hardware threads”) doesn’t necessarily mean that you can spawn a process that uses that many. What’s a simple example? Containers! Did you know that when you invoke docker to run a container, you can easily limit how much CPU the container can use? In this case, we’re looking at the --cpuset-cpus parameter, as the --cpus one works differently.

As you can see, nproc here gets the right bit of information, so if you’re wanting to do a calculation such as “Please use up to the maximum available CPUs” as a parameter to the configuration of a piece of software (such as how many threads to run), you get the right number.

But what if you use some of the other common methods?

In this case, if you base your number of threads off grepping lscpu you take another dependency (on the util-linux package), which isn’t needed. You also get the wrong answer, as you do by grepping /proc/cpuinfo. So, what this will end up doing is just increase the number of context switches, possibly also adding a performance degradation. It’s not just in docker containers where this could be an issue of course, you can use the same mechanism that docker uses anywhere you want to control resources of a process.

Another subtle thing to watch out for is differences in /proc/cpuinfo content depending on CPU architecture. You may not think it’s an issue today, but who wants to needlessly debug something?

tl;dr: for determining “how many processes to run”: use nproc, don’t grep lscpu or /proc/cpuinfo