CPU linux
From Teknologisk videncenter
To temporarily shut down a CPU core, use the command echo 0 > /sys/bus/cpu/devices/cpu1/online. Repeat this command for each CPU, except for cpu0. Write "1" to enable the CPU again. =BeagleV-Ahead example"
root@BeagleV:/home/beagle# lscpu
Architecture: riscv64
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
root@BeagleV:/home/beagle# echo "0" > /sys/bus/cpu/devices/cpu3/online
root@BeagleV:/home/beagle# lscpu
Architecture: riscv64
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-2
Off-line CPU(s) list: 3
root@BeagleV:/home/beagle# echo "0" > /sys/bus/cpu/devices/cpu2/online
root@BeagleV:/home/beagle# echo "0" > /sys/bus/cpu/devices/cpu1/online
root@BeagleV:/home/beagle# lscpu
Architecture: riscv64
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0
Off-line CPU(s) list: 1-3