Skip to content

Instantly share code, notes, and snippets.

@Ham5ter
Last active April 12, 2017 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ham5ter/c4acffe2116565ac9d09c6f2a47ef485 to your computer and use it in GitHub Desktop.
Save Ham5ter/c4acffe2116565ac9d09c6f2a47ef485 to your computer and use it in GitHub Desktop.
# This Script enables all "offline" RAM and CPU ressources on linux
# If you i.e. added RAM to your Virtual Machine, you can use this one liner so that Linux detects the new offline RAM and adds it to its RAM Pool
# same for CPU's
grep -l offline /sys/devices/system/memory/*/state | while read line; do echo "online" > ${line}; done
grep -l 0 /sys/devices/system/cpu/cpu*/online | while read line; do echo "1" > ${line}; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment