Wednesday, November 24, 2010

Hotplug CPU in Linux

Today playing with a VM machine i tried to hotplug a CPU in linux . Awesome feature handy when troubleshooting cpu load or process cpu scheduling .
First List the cpu Status
# grep "processor" /proc/cpuinfo

To disable cpu1 do the following
# echo 0 > /sys/devices/system/cpu/cpu1/online

To enable cpu1 do the following
# echo 1 > /sys/devices/system/cpu/cpu1/online

No comments:

Post a Comment