I'm trying to disable some CPUs of my server.<br>
I've found this link: https://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/linux-turn-on-off-cpu-core-commands/, which offers me a method as below:<br>

Here is what `numactl --hardware` gave me:<br>
[![enter image description here][1]][1]

I want to disable all CPUs from 16 to 63, so I write a script named `opCPUs.sh` as below:<br>

    #!/bin/bash
    
    for i in {16..63}; do
            if [[ "$1" == "enable" ]]; then
                    echo 1 > /sys/devices/system/cpu/cpu$i/online
            elif [[ "$1" == "disable" ]]; then
                    echo 0 > /sys/devices/system/cpu/cpu$i/online
            else
                    echo 'illegal parameter'
            fi
    done
    grep "processor" /proc/cpuinfo

Then I execute it: `./opCPUs.sh disable` and I can see the result of `grep` in the script:<br>
[![enter image description here][2]][2]

It seems to work.<br>

Now I think all of processes should be in CPU 0 - 15 because others have been disabled.<br>
So I use the existing processes `dbus` to verify as below:<br>
`ps -Lo psr $(pgrep dbus)`

I get this:<br>
[![enter image description here][3]][3]

The `psr` tells me in which CPU the process is running, right? If so, I have disabled CPU 60, CPU 52 etc, why they are still here?


  [1]: https://i.sstatic.net/ikcWk.png
  [2]: https://i.sstatic.net/TVoJQ.png
  [3]: https://i.sstatic.net/ky0OI.png