Difference between revisions of "CPU linux"
From Teknologisk videncenter
(Created page with "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. Category:Linux") |
m |
||
Line 1: | Line 1: | ||
− | 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. | + | 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" | ||
+ | <source lang=bash> | ||
+ | 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 | ||
+ | </source> | ||
[[Category:Linux]] | [[Category:Linux]] |
Revision as of 09:11, 7 April 2024
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