How do I know how many processors (vcpus) my XEN system has?

If I started topor looked /proc/cpuinfo, I see only two processors. If I look at the values ​​displayed for my system with virt-manager, this tool shows me 32 vcpus (this is the value that I think is correct).

I have not been able (yet) to find out the correct value (32) at the script level on the hypervisor. I have been studying /proc/cpuinfoand /sys/devices/system/cpu/other things that I could think of, but did not find this value anywhere. Also, shell commands, such as xenor xm, I carefully studied, but did not find a way to display the value I'm looking for.

Does anyone know how I can find out how much vcpus my XEN system provides?

EDIT: lscpugives me:

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                2
On-line CPU(s) list:   0,1
Thread(s) per core:    2
Core(s) per socket:    1
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 45
Stepping:              7
CPU MHz:               2900.086
BogoMIPS:              5800.17
Hypervisor vendor:     Xen
Virtualization type:   none
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              20480K
NUMA node0 CPU(s):     0,1

, "32" .

/proc/cpuinfo:

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 45
model name  : Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz
stepping    : 7
microcode   : 0x70d
cpu MHz     : 2900.086
cache size  : 20480 KB
physical id : 0
siblings    : 2
core id     : 0
cpu cores   : 1
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu de tsc msr pae cx8 apic sep cmov pat clflush acpi mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl nonstop_tsc pni pclmulqdq est ssse3 cx16 sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes hypervisor lahf_lm ida arat pln pts dtherm
bogomips    : 5800.17
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 6
model       : 45
model name  : Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz
stepping    : 7
microcode   : 0x70d
cpu MHz     : 2900.086
cache size  : 20480 KB
physical id : 0
siblings    : 2
core id     : 0
cpu cores   : 1
apicid      : 1
initial apicid  : 1
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu de tsc msr pae cx8 apic sep cmov pat clflush acpi mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl nonstop_tsc pni pclmulqdq est ssse3 cx16 sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes hypervisor lahf_lm ida arat pln pts dtherm
bogomips    : 5800.17
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:
+4
2

:

IFS=: read _ nr_cpus < <(xm info | grep ^nr_cpus)
echo "$nr_cpus"

()

32

.

+3

:

cat /proc/cpuinfo | grep "core id"

:

core id     : 0
core id     : 1
core id     : 0
core id     : 1

, core-id 0 core-id 1.

+1

Source: https://habr.com/ru/post/1598711/


All Articles