Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
18
votes
1
answers
2323
views
CPU number not equal to threads per core X cores per socket X sockets
As far as I understand, the number of CPUs in my computer should be given by CPU = Thread(s) per core x Core(s) per socket x Socket(s) Here are the first few lines of the `lscpu` output: $ lscpu | head -n18 Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 46 bits physical, 48 bits...
As far as I understand, the number of CPUs in my computer should be given by
CPU = Thread(s) per core x Core(s) per socket x Socket(s)
Here are the first few lines of the
lscpu
output:
$ lscpu | head -n18
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 22
On-line CPU(s) list: 0-21
Vendor ID: GenuineIntel
Model name: Intel(R) Core(TM) Ultra 7 155H
CPU family: 6
Model: 170
Thread(s) per core: 2
Core(s) per socket: 16
Socket(s): 1
Stepping: 4
CPU(s) scaling MHz: 14%
CPU max MHz: 4800.0000
CPU min MHz: 400.0000
BogoMIPS: 5990.40
What’s going on? 2 × 16 = 32, not 22. Even running nproc --all
shows 22.
Am I missing something?
Miguel
(183 rep)
Apr 1, 2025, 11:27 AM
• Last activity: Apr 16, 2025, 07:56 AM
0
votes
1
answers
126
views
why nr_involuntary_switches of a process runs on an isolated cpu is constantly increasing?
I have a server (linux 4.18+intel xeon) which has isolated cpus for latency-sensitive service. I noticed that the service process's nr_involuntary_switches is gradually increasing every a few seconds by looking at the `/proc/{pid}/sched`. My questions is: since the cpu is dedicated for the service p...
I have a server (linux 4.18+intel xeon) which has isolated cpus for latency-sensitive service.
I noticed that the service process's nr_involuntary_switches is gradually increasing every a few seconds by looking at the
/proc/{pid}/sched
.
My questions is: since the cpu is dedicated for the service process, how come there is still context-switches?
Xiaoyong Guo
(101 rep)
Aug 28, 2024, 07:03 AM
• Last activity: Aug 28, 2024, 02:56 PM
0
votes
1
answers
94
views
Why is Linux in ChromeOS Flex reporting wrong number of CPU sockets?
dajnyx@penguin:~$ lscpu ... CPU(s): 2 On-line CPU(s) list: 0,1 Vendor ID: GenuineIntel Model name: Intel(R) Celeron(R) CPU 1037U @ 1.80GHz CPU family: 6 Model: 58 Thread(s) per core: 1 Core(s) per socket: 1 Socket(s): 2 ... It should be sockets 1 and cores per socket 2. It is the same problem with o...
dajnyx@penguin:~$ lscpu
...
CPU(s): 2
On-line CPU(s) list: 0,1
Vendor ID: GenuineIntel
Model name: Intel(R) Celeron(R) CPU 1037U @ 1.80GHz
CPU family: 6
Model: 58
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 2
...
It should be sockets 1 and cores per socket 2. It is the same problem with other CPUs I have tested. This causes some programs to misbehave.
This is ChromeOS Flex version 126.0.6478.132 (Official Build) (64-bit)
The distribution is (in /etc/debian_version):
Debian 12.6
The kernel is (according to uname -a):
Linux penguin 6.6.30-02725-g3e8c91b46252 #1 SMP PREEMPT_DYNAMIC Fri, 21 Jun 2024 04:09:40 +0000 x86_64 GNU/Linux
Wolk
(1 rep)
Jul 7, 2024, 05:32 PM
• Last activity: Jul 7, 2024, 08:48 PM
1
votes
1
answers
100
views
Curious lscpu Output Related to CPU Calculation
I have been trying to understand `lscpu`'s output and came across several threads dedicated to concepts of CPUs, physical cores, and threads. Based on those threads, to get the total number of CPUs (logical units), you would do the following: `Thread(s) per core` x `Core(s) per socket` x `Socket(s)`...
I have been trying to understand
lscpu
's output and came across several threads dedicated to concepts of CPUs, physical cores, and threads. Based on those threads, to get the total number of CPUs (logical units), you would do the following: Thread(s) per core
x Core(s) per socket
x Socket(s)
.
Given the partial output from my machine shown below, I would expect CPU(s)
to be 28, but it is listed as 20.
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 20
On-line CPU(s) list: 0-19
Vendor ID: GenuineIntel
Model name: 12th Gen Intel(R) Core(TM) i9-12900H
CPU family: 6
Model: 154
Thread(s) per core: 2
Core(s) per socket: 14
Socket(s): 1
Can someone help me to understand the apparent disconnect between my expectation for the CPU count and what lscpu
actually produced in this instance? I can't seem to find similar cases.
Jason
(13 rep)
Jan 26, 2024, 05:47 PM
• Last activity: Jan 26, 2024, 07:24 PM
-1
votes
1
answers
313
views
How to transform lscpu output to JSON format?
I've had to deal with case I need the JSON format data of `lscpu` output, but `-J` key hasn't supported. So I made simple command line script allows to transform plain output to JSON which I'll post here as an answer.
I've had to deal with case I need the JSON format data of
lscpu
output, but -J
key hasn't supported.
So I made simple command line script allows to transform plain output to JSON which I'll post here as an answer.
Aleksey
(57 rep)
Jan 18, 2024, 02:50 PM
• Last activity: Jan 19, 2024, 11:32 AM
-1
votes
1
answers
243
views
How can I find the human readable name for a CPU?
I need to know the name of the CPU used in a GKE cluster I have launched. The `gcloud` command has a `--min-cpu-platform` option, but my understanding is that is the minimum and I may get a later CPU type. When I log into the node and run `lscpu` and/or `lshw` the `CPU Family`, `Model`, and `Steppin...
I need to know the name of the CPU used in a GKE cluster I have launched. The
gcloud
command has a --min-cpu-platform
option, but my understanding is that is the minimum and I may get a later CPU type. When I log into the node and run lscpu
and/or lshw
the CPU Family
, Model
, and Stepping
are given, but I have been unable to find a way to convert these values into something like "Ice Lake", or "Cascade Lake", etc. which is what I need.
This is not a duplicate of https://unix.stackexchange.com/questions/230634/how-to-find-out-intel-architecture-family-from-command-line as either the commands are not available on GKE nodes, or do not produce the information I am looking for. I need a way to lookup the name given the CPU family, model, and stepping values provided by lscpu
. Neither ark.intel.com nor Wikipedia seem to have this information.
Haywood Slap
(99 rep)
Dec 15, 2023, 06:57 PM
• Last activity: Dec 17, 2023, 04:18 PM
1
votes
1
answers
195
views
Interpret the output of lscpu
Where I work, I have access to a cluster. I logged in into one node and did "lscpu". Here's the output: [![enter image description here][1]][1] [1]: https://i.sstatic.net/PVYH0.png Now I am very confused. If I google the CPU: ` Intel® Xeon® Processor E5-2699 v4 `: https://www.intel.com/con...
Where I work, I have access to a cluster. I logged in into one node and did "lscpu".
Here's the output:
Now I am very confused. If I google the CPU:

Intel® Xeon® Processor E5-2699 v4
: https://www.intel.com/content/www/us/en/products/sku/91317/intel-xeon-processor-e52699-v4-55m-cache-2-20-ghz/specifications.html
It says the CPU has 22 cores and 44 threads. So does this node of the server has 1 or 2 of these chips?
phdstudent
(111 rep)
Oct 3, 2023, 07:43 PM
• Last activity: Oct 3, 2023, 07:53 PM
38
votes
2
answers
44868
views
Understanding output of lscpu
You can see the output from `lscpu` command - jack@042:~$ lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 56 On-line CPU(s) list: 0-55 Thread(s) per core: 2 Core(s) per socket: 14 Socket(s): 2 NUMA node(s): 2 Vendor ID: GenuineIntel CPU family: 6 Model: 79...
You can see the output from
lscpu
command -
jack@042:~$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 56
On-line CPU(s) list: 0-55
Thread(s) per core: 2
Core(s) per socket: 14
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 79
Model name: Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz
Stepping: 1
CPU MHz: 2600.000
CPU max MHz: 2600.0000
CPU min MHz: 1200.0000
BogoMIPS: 5201.37
Virtualization: VT-x
Hypervisor vendor: vertical
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 35840K
NUMA node0 CPU(s): 0-13,28-41
NUMA node1 CPU(s): 14-27,42-55
I can see that there are 2
sockets (which is like a processor ??) and inside each of the socket we have 14
cores. So, in total 2x14=28
physical cores. Normally, a CPU can contain multiple cores, so number of CPUs can never be smaller than number of Cores. But, as shown in the output CPUs(s): 56
and this is what is confusing me.
I can see that Thread(s) per core: 2
, so these 28
cores can behave like 2x28=56
logical cores.
**Question 1:** What does this CPUs(s): 56
denote? Does CPU(s)
denote number of Virtual/Logical core, as it cannot be a Physical core core atleast?
**Question 2:** What does this NUMA node
mean? Does it represent the socket?
cph_sto
(483 rep)
Sep 13, 2018, 11:16 AM
• Last activity: Jun 1, 2023, 06:39 AM
1
votes
0
answers
131
views
lscpu list different max cpu freq
Is this a bug from lscpu? How to fix it? ``` ~$ lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian Address sizes: 46 bits physical, 48 bits virtual CPU(s): 20 On-line CPU(s) list: 0-19 Thread(s) per core: 1 Core(s) per socket: 12 Socket(s): 1 NUMA node(s): 1 Vendor I...
Is this a bug from lscpu?
How to fix it?
~$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 46 bits physical, 48 bits virtual
CPU(s): 20
On-line CPU(s) list: 0-19
Thread(s) per core: 1
Core(s) per socket: 12
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 151
Model name: 12th Gen Intel(R) Core(TM) i7-12700
Stepping: 2
CPU MHz: 2096.531
CPU max MHz: 6300.0000
CPU min MHz: 800.0000
This is an Intel i7-12700, it lists the CPU max MHz is 6300.0000
However, I checked the Intel website, and it lists:
Max Turbo Frequency
4.90 GHz
Intel® Turbo Boost Max Technology 3.0 Frequency ‡
4.90 GHz
Performance-core Max Turbo Frequency
4.80 GHz
Efficient-core Max Turbo Frequency
3.60 GHz
Performance-core Base Frequency
2.10 GHz
Efficient-core Base Frequency
1.60 GHz
ref:
https://ark.intel.com/content/www/us/en/ark/products/134591/intel-core-i712700-processor-25m-cache-up-to-4-90-ghz.html
OS version:
~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/ "
SUPPORT_URL="https://help.ubuntu.com/ "
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/ "
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy "
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
Mark K
(955 rep)
Apr 28, 2023, 05:29 AM
• Last activity: Apr 28, 2023, 10:47 PM
2
votes
0
answers
879
views
What is the exact source of Architecture info in lscpu command
# Tl;dr I need to mock info about CPU architecture on the server for testing purpose. The only way that I can achieve it, is by changing info source about CPU architecture, that is used by lscpu command (**`lscpu | grep Architecture` HAS to return mocked architecture**). I know that lscpu gets data...
# Tl;dr
I need to mock info about CPU architecture on the server for testing purpose. The only way that I can achieve it, is by changing info source about CPU architecture, that is used by lscpu command (**
lscpu | grep Architecture
HAS to return mocked architecture**). I know that lscpu gets data from /proc/cpuinfo
and sysf
, but I cannot find **what exactly** I need to change, for lscpu to return different architecture?
# Context
I'm performing simple checks for CPU architecture used by user. I'm doing it by check like if 'arm' =~ (lscpu | grep Architecture | awk '{print $2}')
. It's trivial check, that I want to cover. However, the issue is, that I don't know how to perform different checks for different types of architecture.
What I've tried to do:
1. Pre-preparing lscpu file with mocked echo Architecture:
and adding it to $PATH - tested app uses different $PATH, so it is not effective.
2. Pre-preparing lscpu file with mocked lscpu | sed -r
and binding it over orginal lscpu by sudo mount --bind /usr/bin/lscpu
- in this case, every lscpu
call hangs the machine.
3. Using different command than lscpu - tested app uses lscpu explicitly.
That's how I've assumed that the only way is to mock the data in /proc/cpuinfo (example output below: there's no "CPU Architecture" field):
processor : 31
vendor_id : AuthenticAMD
cpu family : 25
model : 33
model name : AMD Ryzen 9 5950X 16-Core Processor
stepping : 0
microcode : 0xa201025
cpu MHz : 4065.719
cache size : 512 KB
physical id : 0
siblings : 32
core id : 15
cpu cores : 16
apicid : 31
initial apicid : 31
fpu : yes
fpu_exception : yes
cpuid level : 16
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca fsrm
bugs : sysret_ss_attrs spectre_v1 spectre_v2 spec_store_bypass
bogomips : 6787.39
TLB size : 2560 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 48 bits virtual
power management: ts ttp tm hwpstate cpb eff_freq_ro
or sysfs, for lscpu to be ran normally and output the mocked data. However I cannot find the specific place for this CPU architecture data to change - is it possible? If yes, what is the exact place where this data is stored, and how to mock it? Every idea would be appreciated!
mindgod
(21 rep)
Mar 28, 2023, 05:56 PM
• Last activity: Mar 28, 2023, 05:57 PM
-3
votes
1
answers
42
views
grep/awk/sed lines from match until text
I would like to get the following output from `lscpu`: ``` (number of cores) x (cpu model name) @ (max mhz) ``` I already figured out the attribute I need: - `Model name:` - `Core(s) per socket` - `CPU max MHz` But on my system, there are multiple CPUs with different models and clock speeds. So I ha...
I would like to get the following output from
lscpu
:
(number of cores) x (cpu model name) @ (max mhz)
I already figured out the attribute I need:
- Model name:
- Core(s) per socket
- CPU max MHz
But on my system, there are multiple CPUs with different models and clock speeds. So I have multiple attributes in output named Model name:
.
I want the output mentioned above, only with grep
, awk
and/or sed
.
Any help will be appreciated.
sudoer
(65 rep)
Aug 27, 2022, 12:05 PM
• Last activity: Aug 28, 2022, 07:45 AM
0
votes
2
answers
3182
views
multi-core linux workstation recognizes only 1 cpu, 1 core, 1 thread
I'm using ubuntu 20.04 on [Dell Precision 7820](https://www.dell.com/en-us/work/shop/workstations-isv-certified/precision-7820-desktop-workstation/spd/precision-7820-workstation#features_section). $ uname -a Linux myhost 5.4.0-56-generic #62-Ubuntu SMP Mon Nov 23 19:20:19 UTC 2020 x86_64 x86_64 x86_...
I'm using ubuntu 20.04 on [Dell Precision 7820](https://www.dell.com/en-us/work/shop/workstations-isv-certified/precision-7820-desktop-workstation/spd/precision-7820-workstation#features_section) .
$ uname -a
Linux myhost 5.4.0-56-generic #62-Ubuntu SMP Mon Nov 23 19:20:19 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Only one cpu is used/known by the OS, as can also be seen in
htop
.
Output of lscpu
(only 1 cpu, 1 ocre, 1 thread)
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 46 bits physical, 48 bits virtual
CPU(s): 1
On-line CPU(s) list: 0
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 85
Model name: Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz
Stepping: 4
CPU MHz: 799.999
CPU max MHz: 3000.0000
CPU min MHz: 800.0000
BogoMIPS: 4200.00
Virtualization: VT-x
L1d cache: 32 KiB
L1i cache: 32 KiB
L2 cache: 1 MiB
L3 cache: 11 MiB
NUMA node0 CPU(s): 0
Vulnerability Itlb multihit: KVM: Mitigation: Split huge pages
Vulnerability L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT disabled
Vulnerability Mds: Mitigation; Clear CPU buffers; SMT disabled
Vulnerability Meltdown: Mitigation; PTI
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Full generic retpoline, IBPB conditional, IBRS_FW, RSB filling
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Mitigation; Clear CPU buffers; SMT disabled
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti intel_ppin ssbd mba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req pku ospke md_clear flush_l1d
Also in output of cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 85
model name : Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz
stepping : 4
microcode : 0x2006a08
cpu MHz : 802.610
cache size : 11264 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti intel_ppin ssbd mba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req pku ospke md_clear flush_l1d
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit
bogomips : 4200.00
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
As suggested in other Qs, some were related to grub setting. But I still found no solution.
$ cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=off apm=off"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
wsdzbm
(2936 rep)
Dec 7, 2020, 08:42 PM
• Last activity: Dec 12, 2020, 09:50 PM
0
votes
1
answers
419
views
Could thread be counted as a CPU?
So I typed in `lscpu` into my terminal and saw this: ``` CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 2 Core(s) per socket: 2 Socket(s): 1 ``` The no. of CPU(s) is 4 here because of the formula: `No. of CPUs = Sockets X Cores per socket X Threads per Core` But the question is, what exactly...
So I typed in
lscpu
into my terminal and saw this:
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
The no. of CPU(s) is 4 here because of the formula:
No. of CPUs = Sockets X Cores per socket X Threads per Core
But the question is, what exactly is a CPU? Why are we including threads in the above formula?
stagee
(1 rep)
Aug 11, 2020, 12:22 PM
• Last activity: Aug 11, 2020, 02:22 PM
1
votes
0
answers
400
views
CPU MHz don't reach CPU min MHz in lscpu
I think CPU MHZ is always more than CPU min MHz. But, my server can't do that now. When it looks like below, what should I check? ---- Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 40 On-line CPU(s) list: 0-39 Thread(s) per core: 2 Core(s) per socket: 10 Socke...
I think CPU MHZ is always more than CPU min MHz.
But, my server can't do that now.
When it looks like below, what should I check?
----
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 40
On-line CPU(s) list: 0-39
Thread(s) per core: 2
Core(s) per socket: 10
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 62
Model name: Intel(R) Xeon(R) CPU E5-2690 v2 @ 3.00GHz
Stepping: 4
CPU MHz: 172.617
CPU max MHz: 3600.0000
CPU min MHz: 1200.0000
BogoMIPS: 6001.58
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 25600K
NUMA node0 CPU(s): 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38
NUMA node1 CPU(s): 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm spec_ctrl retpoline kaiser tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
byulk
(11 rep)
Mar 16, 2020, 02:09 AM
• Last activity: Mar 16, 2020, 02:52 AM
1
votes
0
answers
95
views
How system slots or ports are detected by linux?
how does an operating system say linux understand how many ram/pci/cpu slots/sockets are there? Does the operating system detect this or just the info is passed from bios acpi if so please tell how even bios detects this? Modern OSes scan the hardware again as much as i know but i am confused when i...
how does an operating system say linux understand how many ram/pci/cpu slots/sockets are there?
Does the operating system detect this or just the info is passed from bios acpi if so please tell how even bios detects this?
Modern OSes scan the hardware again as much as i know but i am confused when it comes to slots.
I understand how they can detect the device installed in it, like for instance the pci devices are detected by bus enumeration attempting to read vendor ID and Device ID for each combination of bus number and device number.
How are ram/pci slots and cpu sockets detected? like how many are there.
Thanks for the help :)
Zeeshan Haris
(51 rep)
Feb 24, 2020, 05:33 AM
1
votes
0
answers
49
views
Is there a way to make my computers fans turn on instead of the CPU dropping frequency? I'm using Linux Mint 19.3
My computer, for whatever reason, will lower CPU usage when it gets hot instead of turning on its fan. I don't know if it's a driver issue or something else. Thanks! [![This is at 80 Celcius][1]][1] [1]: https://i.sstatic.net/nkNjW.png The above is at 80 degrees Celcius.
My computer, for whatever reason, will lower CPU usage when it gets hot instead of turning on its fan. I don't know if it's a driver issue or something else. Thanks!
The above is at 80 degrees Celcius.

T1 L.
(11 rep)
Feb 19, 2020, 03:07 PM
3
votes
1
answers
835
views
How to reliably tell from Linux whether the CPU supports Hyperthreading, even if Hyperthreading is disabled?
The following is what I am doing to tell whether a processor does support HT or not, regardless of whether it is enabled or disabled: # dmidecode -t processor | grep "Hardware Thread" | wc -l If result is 0, then the processor does not support HT. If result is > 0, then it does. However, I'm not so...
The following is what I am doing to tell whether a processor does support HT or not, regardless of whether it is enabled or disabled:
# dmidecode -t processor | grep "Hardware Thread" | wc -l
If result is 0, then the processor does not support HT.
If result is > 0, then it does.
However, I'm not so sure if this is universally reliable. I've checked this at least with Ubuntu 16.04, 18.04, and SLES 12, with different Intel processors on a few servers (Xeons) and laptops (e.g. Core i5), and works well there. But would it reliably work for any processor (e.g. AMDs, even ARM maybe?) and in all distributions, by just checking whether
dmidecode
lists that exact text, "Hardware Thread"? Is there a safer way?
From what I can tell, for sure the HT flag listed by [lscpu
](https://linux.die.net/man/1/lscpu) is not at all the way to go, because it gets listed even for a core i5 processor, which does not support HT.
PS. The following posts do float around this topic, but whether Hyperthreading is enabled or not is a different matter:
https://unix.stackexchange.com/questions/33450/checking-if-hyperthreading-is-enabled-or-not ,
[How can I test if Ubuntu activated hyperthreading?](https://askubuntu.com/questions/72999/how-can-i-test-if-ubuntu-activated-hyperthreading)
Raulinbonn
(66 rep)
Feb 12, 2020, 09:44 AM
• Last activity: Feb 12, 2020, 01:41 PM
3
votes
1
answers
3672
views
how to get number of total core include thread
as all know lscpu give the info about number of CORE and number of Thread lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 48 On-line CPU(s) list: 0-47 Thread(s) per core: 2 I am searching about command that can give the total as ( number of CORE ) X ( numb...
as all know lscpu give the info about number of CORE and number of Thread
lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 48
On-line CPU(s) list: 0-47
Thread(s) per core: 2
I am searching about command that can give the total as
( number of CORE ) X ( number of Thread ) = 96
so output will be as case above = 96 CPU
we can do as
CORE=
nproc --all
THREAD= lscpu | grep -i Thread | awk '{print $NF}'
and
echo "$(( $CORE*$THREAD ))"
but this isn't elegant way
or maybe other elegant approach ?
we try also this ( but not get the total 96 cores's )
num_cpus=$(nproc)
# echo $num_cpus
48
yael
(13936 rep)
Aug 12, 2019, 10:39 PM
• Last activity: Aug 13, 2019, 04:57 AM
2
votes
0
answers
165
views
Which reasons may cause low MHz of CPU
My system is Ubuntu 16.04.3. I installed it just now and executed some processes on it. I found that many processes used more than 100% CPUs. However, when I executed `lscpu | grep MHz`, I got the output as below: CPU MHz: 423.687 CPU max MHz: 2200.0000 CPU min MHz: 800.0000 If I'm right, `CPU MHz`...
My system is Ubuntu 16.04.3. I installed it just now and executed some processes on it. I found that many processes used more than 100% CPUs. However, when I executed
lscpu | grep MHz
, I got the output as below:
CPU MHz: 423.687
CPU max MHz: 2200.0000
CPU min MHz: 800.0000
If I'm right, CPU MHz
is the current MHz, so this is weird. Why can the current MHz be lower than CPU min MHz
, even if some processes have used more than 100% CPUs?
Yves
(3401 rep)
May 24, 2019, 03:07 AM
3
votes
0
answers
5297
views
cpupower frequency-set does not work
So I have this Dual Intel Silver 4116 CPU server that will set the MHz to 132 randomly, the server becomes unusable after that point. Even reboots don't restore the MHz, only driving to the data centre and powering off the server for 10 seconds or so restores to 800 MHz (Idling clock speed). I have:...
So I have this Dual Intel Silver 4116 CPU server that will set the MHz to 132 randomly, the server becomes unusable after that point. Even reboots don't restore the MHz, only driving to the data centre and powering off the server for 10 seconds or so restores to 800 MHz (Idling clock speed).
I have:
- disabled the intel_pstate driver and verified that acpi-cpufreq are running
- set the governer to both performance or userspace
- set the frequency manually
roderick@super:~$ cpupower frequency-info
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 10.0 us
hardware limits: 800 MHz - 2.10 GHz
available frequency steps: 2.10 GHz, 2.10 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz
available cpufreq governors: conservative ondemand userspace powersave performance schedutil
current policy: frequency should be within 1.80 GHz and 1.80 GHz.
The governor "userspace" may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 136 MHz (asserted by call to kernel)
boost state support:
Supported: yes
Active: yes
roderick@super:~$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 48
On-line CPU(s) list: 0-47
Thread(s) per core: 2
Core(s) per socket: 12
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 85
Model name: Intel(R) Xeon(R) Silver 4116 CPU @ 2.10GHz
Stepping: 4
CPU MHz: 132.425
CPU max MHz: 2101.0000
CPU min MHz: 800.0000
BogoMIPS: 4200.00
Virtualisation: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 1024K
L3 cache: 16896K
NUMA node0 CPU(s): 0-11,24-35
NUMA node1 CPU(s): 12-23,36-47
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti intel_ppin ssbd mba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req pku ospke
I am stumped as to how the CPU MHZ can drop like this, it's not overheating or over using I am logging temp and utilisation.
Setting the frequency under performance or userspace governers has no effect.
roderick@super:~$ sudo cpupower --cpu all frequency-set --freq 800MHz
Setting cpu: 0
Setting cpu: 1
... omitted for clarity
Setting cpu: 46
Setting cpu: 47
(In response to comment)
- The server is about 6 months old, it's in a datacentre and I'm unaware how to upgrade the BIOS/if an update is available / how to do it (open to visiting and trying).
- It seem's I'm running the latest microcode
roderick@super:~$ dmesg | grep microcode
[ 0.000000] microcode: microcode updated early to revision 0x200004d, date = 2018-05-15
[ 141.175011] microcode: sig=0x50654, pf=0x1, revision=0x200004d
[ 141.359854] microcode: Microcode Update Driver: v2.2.
roderick@super:~$ sudo apt-get install intel-microcode
[sudo] password for roderick:
Reading package lists... Done
Building dependency tree
Reading state information... Done
intel-microcode is already the newest version (3.20180807a.0ubuntu0.18.04.1).
- This behaviour started about a week ago, it's a 48 core computer that was running at 80% capicity for 48 hours on end with no hickups for 6 months. But now I push it up to about 20% capacity and it drops the clock from between 800-2100 MHz to 132 MHz. If I restart it and let it idle, it's fine, but then when I run my machine learning stuff on it it goes down.
Roderick Obrist
(31 rep)
Apr 12, 2019, 08:25 AM
• Last activity: Apr 14, 2019, 01:58 PM
Showing page 1 of 20 total questions