Skip to content

Instantly share code, notes, and snippets.

@lucmann
Created July 11, 2024 09:52
Show Gist options
  • Save lucmann/4bb5652569107d69494441a468f1208f to your computer and use it in GitHub Desktop.
Save lucmann/4bb5652569107d69494441a468f1208f to your computer and use it in GitHub Desktop.
CPU core hot plug
#!/usr/bin/env bash
set -x
for c in `ls /sys/bus/cpu/devices/cpu[^0]*/online`; do
echo $1 > $c # 2> /dev/null # delete the first comment sign # in this line if you care about what's wrong.
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment