single core mode

This commit is contained in:
Andreas Abel
2019-09-24 14:32:20 +02:00
parent f3b31d391c
commit d182d44406

10
single-core-mode.sh Executable file
View File

@@ -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