diff --git a/single-core-mode.sh b/single-core-mode.sh new file mode 100755 index 0000000..7fad52b --- /dev/null +++ b/single-core-mode.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ "$EUID" -ne 0 ]; then + echo "This script must be run as root" 1>&2 + exit 1 +fi + +for cpu in /sys/devices/system/cpu/cpu[1-9]*; do + echo 0 > "$cpu/online" +done