hot-add of RAM et CPU

It is possible to hot-add RAM and CPU (like in virtual environment) without rebooting the machine.

The following commands can be used.

For the RAM:

root$ for i in $(grep -l offline /sys/devices/system/memory/*/state); do echo online > $i; done

For the CPU:

root$ for i in $(grep -l 0 /sys/devices/system/cpu/*/online); do echo 1 > $i; done

If the RAM or CPU amounts are reduced, it is of course advised to do it after shutting down the machine.