CPUs online or offline

From HPCWIKI
Jump to navigation Jump to search

Check CPU status

# get the list of offline CPUs
cat /sys/devices/system/cpu/offline

cat /sys/devices/system/cpu/online  
# get the list of online CPUs

# get the list of CPUs
ls -ld /sys/devices/system/cpu/cpu* 

# print individual CPU's online/offline status
cat /sys/devices/system/cpu/cpu*/online 

# set online CPU <number>
echo 1 > /sys/devices/system/cpu/cpu<number>/online 
or 
sudo chcpu -e <number>

# set offline CPU <number>
echo 0 > /sys/devices/system/cpu/cpu<number>/online
or 
sudo chcpu -d <number>

smpboot: native_cpu_up: bad cpu 255

This thread[1] shows system IOMMU enable in BIOS would be required to enable the last CPU core on Gigabyte system. However, it would be also related to other systems' BIOS configuration.

smpboot: native_cpu_up is also related to x2APIC[2] features cause operating systems cannot use x2APIC unless Processor x2APIC Support is set to "Force Enabled" prior to booting OS.


x2APIC is depending on the BIOS configuration and type/version of OS,

  • Windows Server 2016
    • Windows Server 2016 supports AMD EPYC 7xx2-series CPUs, but this O.S. is limited to no more than 255 logical processors. Windows Server 2016 does not support X2APIC mode, and you should disable this mode in BIOS.
    • AMD CBS-> CPU Common Options-> Performance-> CCD/Core/Thread Enablement ->Accept-> SMT control->Disabled (For ASUS BIOS)


References