One process disable, Is it possible?

soolan

Member
Joined
Jan 13, 2023
Messages
66
Reaction score
4
Credits
626
Hello.
I have an Hp server. There are two processors on it and I want to disable one of them. I understand that this is not possible via BIOS. Is this possible via Linux? I read something like this on HP's page

In another discussion, I learnt that under Linux, if I only want the cores of one processor/socket, apart from pulling the second processor from the socket, I can do the following: # echo 0

/sys/devices/system/cpu/ cpu1/online
# echo 0 > /sys/devices/system/cpu/cpu3/online
 


To disable a specific CPU core, you can use the following command:

echo 0 | sudo tee /sys/devices/system/cpu/cpuX/online

Replace "cpuX" with the actual core number you want to disable. Keep in mind that the core numbering starts from 0.
To re-enable the CPU core, you can use the following command:

echo 1 | sudo tee /sys/devices/system/cpu/cpuX/online
 

Members online


Top